Reputation: 39
I have a Google Dev Console process with Google Play Developer API is enabled and the project is linked to Google Play project. In Google Dev console project, created a service account (I'm an owner of the project). After that i create a json file key to authenticate. Tried to using google-api-client in PHP, Google Developer API Playground to send request to In-App-Purchase details of my apps but got error: "The current user has insufficient permissions to perform the requested operation." Details as below:
Request:
GET Request https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/purchases/products/{productId}/tokens/{token}?access_token={access_token}
Response
Array
(
[error] => Array
(
[code] => 401
[message] => The current user has insufficient permissions to perform the requested operation.
[errors] => Array
(
[0] => Array
(
[message] => The current user has insufficient permissions to perform the requested operation.
[domain] => androidpublisher
[reason] => permissionDenied
)
)
)
)
Upvotes: 2
Views: 1885
Reputation: 117244
The Method: purchases.products.get operates on private user data. Due to that fact you used Oauth2 to authorize a user and get an access token.
this method requires that the user to consent to the following scope
The error message The current user has insufficient permissions to perform the requested operation.
Means one of two things.
Upvotes: 0