Error: 'The project id used to call the Google Play Developer API has not been linked in the Google Play Developer Console.'

こ雲淡風輕ζ 提交于 2019-12-27 12:15:29

问题


I am getting the following error while accessing Google Play Developer API using a service account:

The project id used to call the Google Play Developer API has not been linked in the Google Play Developer Console.

The service account email and .p12 file were generated using the service account option in APIs&Auth -> Credentials. The Application in the Google Play Developer API was linked to the project using the project id as mentioned in google's docs.

However, I am still getting this error when I try to use the Publishing API. I am looking for a solution to this error and a step by step process to use the Google Publishing API for the Java client to publish an APK using the Google Play Developer API. I am using androidpublisher_v2_public.


回答1:


I understand you. Google confuses you with changing service names and workflows. Their documents aren't updated enough to match their newest API workflows.

I was using the Google Play Developer Service API v2 on the server-side with an alpha-version APK, and had the same error as you: "The project id used to call the Google Play Developer API has not been linked in the Google Play Developer Console."

This is my solution:

Google Developer Console

  1. "Google Developer Console" > "APIs & Auth" subcategory "APIs" > (api list) "Google Play Android Developer API". Set "STATUS" to "ON".

  2. "APIs & auth" subcategory "Credentials" > "Create new Client ID". Choose "Service account" and create the id.

  3. You should get a P12 key from the browser.

Google Play Developer Console

  1. "Google Play Developer Console" > "Settings" > subcategory "API access".

  2. Make a link to your "Linked Project".

  3. "Service Account" place may be already showing your "Service account" CLIENT ID which made "google developer console".

By default this account is gray indicating that it is not active. So you must activate it and set authority manually.

You should now get a correct response from the API.

Good luck.




回答2:


Got the same error trying to validate in-app purchases.

This has worked for me:

Go to

Google Play Developer Console > Settings > API Access.

Find your project under "Linked Project" and click "Link" button.

If you get the same error again, maybe is because you have configured and purchased products in your console before linking the project.

To solve it, simply add new product in your app.




回答3:


If you receive this response when making a request to Android Publisher API, but your project is already linked try to create new In-App Product. If there is a product created before linking, it fails on product transaction fetching when making a purchase. With new product, error goes away.

https://dev.to/sandris/androidpublisher--projectnotlinked-error-43c7




回答4:


Check your fastlane/Appfile.

Your package_name match with your project package and the project created in your google account.



来源:https://stackoverflow.com/questions/25481207/error-the-project-id-used-to-call-the-google-play-developer-api-has-not-been-l

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!