AndroidPublisher API return projectNotLinked error

前端 未结 8 1773
栀梦
栀梦 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:39

    I have exactly the same issue. but i have resolved . [request]: - you must link project Google Play Developer Console before you create inapp purchase

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

    After days trying to use API Explorer to use Android Publisher API but failed, I requested support from Google and receive the answer "It looks like API Explorer is no longer supported for the Publishing API". So basically I can't use API Explorer to check in-app purchase token again. Hope this help who's struggling with this.

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

    You need to link the project in the Google Play Developer Console under Settings -> Api Access.

    See my complete answer here: https://stackoverflow.com/a/25825907/1745234

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

    I got the same error message when using a "SERVICE ACCOUNT" for authentication. But everything works fine when using a OAuth client of type "installed application". To fix:

    1. Go to the API Access page on the Google Play Developer Console.
    2. Click on "Create oAuth client" button.
    3. Make sure you select "Installed Application"
    4. Use the generated client id and secret to get access/refresh tokens as described in https://developers.google.com/android-publisher/authorization
    5. Use the access token to make api requests.
    0 讨论(0)
  • 2021-01-01 16:50

    In case anybody else has the same issue, try adding a new product/subscription in your Google Play console account. That worked for me, although seems to be some kind of inconsistency problem in Google services.

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

    I got this too and just gave up on getting it to work, instead switching back to v1.1 of the API:

    final URL url = new URL(
            "https://www.googleapis.com/androidpublisher" +
            "/v1.1/applications/" + "com.example.app.id" +
            "/subscriptions/" + subcriptionId +
            "/purchases/" + googlePurchaseReceipt +
            "?access_token=" + googleAccessToken);
    

    Hopefully someone will post a better answer sometime and we can all switch to v2 of the API.

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