AndroidPublisher API return projectNotLinked error

前端 未结 8 1774
栀梦
栀梦 2021-01-01 16:30

This happens when I was using Google Play Android Developer API in Google Developers Console to test the status of purchased product, and the result is always like this

相关标签:
8条回答
  • 2021-01-01 16:53

    The APIs Explorer doesn't appear to work with v2 of the API. A bug has been reported: https://code.google.com/p/google-apis-explorer/issues/detail?id=268

    0 讨论(0)
  • 2021-01-01 16:59

    Make sure the InApp-product is created after linking the API-project.

    If you (like me) created the InApp-product first, and then linked the API-project afterwards, you will not be able to call any of the androidpublisher.purchases.* endpoints without getting the "projectNotLinked"-error. Neither from code or via the API-explorer.

    You can verify this is the problem by calling androidpublisher.inappproducts.list. If this succeeds, your API-project is correctly linked to the Google Play Console...

    It will not help to recreate users in Google API's. Nor to change authentication between OAuth 2.0 client IDs or Service account keys. Everything will work as expected when you create a new InApp-product after linking the API-project.

    0 讨论(0)
提交回复
热议问题