Google Play Developer API for Android - Privilege List - "Insufficient Resolution"

When trying to list the rights to receive:

403 Forbidden { "code" : 403, "errors" : [ { "domain" : "global", "message" : "Insufficient Permission", "reason" : "insufficientPermissions" } ], "message" : "Insufficient Permission" } 

I am using "WithInstalledApplication" authorization using client_secrets json.

IMPORTANT: Any other listing works correctly (apks, inappproducts, ...). I only have this rights issue.

I am also sure that the source code is correct, but for reference only:

 final AndroidPublisher service = AndroidPublisherHelper.init(appName, null); final AndroidPublisher.Entitlements entitlements = service.entitlements(); EntitlementsListResponse entList = entitlements.list(pkgName).execute(); System.out.println("Entiltments: " + entList.toString()); 

Thanks for your suggestions.

+5
source share
1 answer

Finally, I found the reason.

The reason was the problem with setting up the area needed "https://www.googleapis.com/auth/googleplay.inapp.readonly" area

I found it in a Google OAuth 2.0 response message:

 HTTP/1.1 403 Forbidden Content-length: 208 X-xss-protection: 1; mode=block X-content-type-options: nosniff Transfer-encoding: chunked Expires: Mon, 01 Jan 2018 23:57:28 GMT Vary: Origin, X-Origin Server: GSE -content-encoding: gzip Cache-control: private, max-age=0 Date: Mon, 01 Jan 2018 23:57:28 GMT X-frame-options: SAMEORIGIN Alt-svc: hq=":443"; ma=2592000; quic=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v="41,39,38,37,35" Content-type: application/json; charset=UTF-8 Www-authenticate: Bearer realm="https://accounts.google.com/", error=insufficient_scope, scope="https://www.googleapis.com/auth/googleplay.inapp.readonly" 
+1
source

Source: https://habr.com/ru/post/1273123/


All Articles