1

I want to make Google receipt validation. I set everything by Marc Greenstock. When I try verified purchase I get response permissionDenied. For me is everything correct and I don't know how to find a mistake. The user has administrator role in Google Play Developer console.

Google developer console:

  1. I enabled "Google Play Android Developer API"
  2. I created service account keys with role Owner
  3. I downloaded JSON file

Google play Developer console:

  1. Link correct project
  2. For correct user set administrator role. The same user is in the file.

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."
}

I tried friend private_key, client_id and client_email and everything works fine. Code is good. I something forgot during configuration but I don't know what.

user1951618
  • 131
  • 12

1 Answers1

0

I forgot to add scope ".../auth/androidpublisher" in Google developer console. enter image description here

After you add scope you should save credentials at the bottom of page.

user1951618
  • 131
  • 12
  • This scope is not available for me. It doesn't appear in the list of scopes, and if I try to add it manually I get an error "The following scope was not added because it is invalid: ../auth/androidpublisher. – ohthepain Jan 02 '20 at 09:54