问题
I'm having trouble with androidpublisher.inapppurchases.get
My project is just according to https://code.google.com/p/google-api-java-client/wiki/OAuth2#Service_Accounts and it worked fine until I migrated to new Google Play Account. So now when I execute request Server-to-Server I am receiving this response.
{
"code" : 401,
"errors" : [ {
"domain" : "androidpublisher",
"message" : "The current user has insufficient permissions to perform the requested operation.",
"reason" : "permissionDenied"
} ],
"message" : "The current user has insufficient permissions to perform the requested operation."
}
Anybody is familiar with this response because in google documentation there is no clue about this.
回答1:
Problem solved adding user service account email address xxxxx@developer.gserviceaccount.com as administrator user in google play settings.
回答2:
From Google Play Console go to (with admin access):
- Setting (Left Panel)
- Developer Account (Left Panel)
- Users & permissions (Left Panel)
- Click on the Invite New User button.
- Enter the service account email (the same you have in the json file you are using and that google generated when you created the service account)
- Select Administrator in the Role DropDown menu.
- Click on SEND INVITATION
That's it. No one can stop you now! :)
回答3:
Unfortunately, the accepted answer did not work for us. For verifying a receipt you would need an Access Token. The Access token is being generated by RefreshToken. RefreshToken has an association to a Google account. That Google account should have View financial information In Google Play console.
- Get Redirect Url using
Android Client ID - Use Redirect URL with a
Financial Access Enabled Accountto get Refresh Token - Get
Access Tokenwith that Refresh Token - Use
Access Tokento verify IAP receipts
来源:https://stackoverflow.com/questions/24432825/permission-issue-google-play