简体   繁体   中英

Error when trying to validate In-app purchase at Google Play

I try to make a validation of purchases on the server, but it can't to make a request to Google Play Android Developer API. After a request it shows this one:

Error calling GET https://www.googleapis.com/androidpublisher/v1.1/applications/my.app.id/inapp/my_in_app_purchase/purchases/purchase_token: (403) Forbidden

If I make a validation of this purchase by the test form in Developers Console, everything is OK and Google API would send a response.

Requests to other API (for example Books API) works fine.

To work with API I use Google APIs Client Library for PHP . Authorization goes by Service Account. In Developers Console access to Google Play Android Developer API is on.

Ok I found the solution!

You must to connect your API with your app. You must go to your Google Play publish page ( https://play.google.com/apps/publish ) and invite a user with the service account email in Settings->User account & rights->Invite new user and give it the privileges of "View financial reports".

Thanks works for me, good luck!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM