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

I'm asking this question again because existing solutions are not working in 2022.
Users give their package name in an input URL.
I have Oauth on my website.
I get auth token and refresh token from here and send a request to the following API.
GET https://www.googleapis.com/androidpublisher/v3/applications/your_package_name/reviews?
access_token=your_auth_token
I get the following error
I get the project id used to call the Google Play Developer API has not been linked in the Google Play Developer Console.'
Is this happening because I have not asked for any scope in Oauth?
Is there any way I can make getting reviews as simple as possible for users? Like after Oauth, users can immediately look at their ratings for this week.
I have switched on all these on play.google.com/console.

Related

How to get the get API path and parameters of Google play developer API?

I have added a non-renewable subscription for one of my projects. We also started implementing the Google play developer API to get the subscription latest status from the Play Store. For that we have done the below steps as per this blog:
Linked the developer account to a new Google Cloud Project.
Enabled the Google Play Developer API for the Google Cloud Project.
Created a service account and created a key for the service account.
I have below clarifications related to this implementation:
I tried to Grant Access for the following permissions: But the corresponding checkmark is not clickable.
View financial data, orders, and cancellation survey responses
Manage orders and subscriptions
The 3rd step as per the blog is to Authorize an API key, but I didn't get a clear idea of that.
We are going to implement this API on the back end side as a corn job, do we need to generate a JWT token for accessing this API? Is this possible to call without a Token? I found 2 types of implementations from this blog, which one is easy and secure?
"Your application can complete these tasks either by using the Google APIs client library for your language or by directly interacting with the OAuth 2.0 system using HTTP."
From where we get the get API path and other details. I found a similar get API from AppStore like this. Is the play store providing a similar kind of get API?
We need the latest purchase status API and for that what parameters do we need to pass?

How to get access_token for replying review in Play Developer API?

This link: Reply to Reviews describes the way to retrieve and reply to reviews. The Google Play Developer Reply to Reviews API allows us to view user feedback for our app and reply to this feedback. But I am finding it difficult to get the authorization token. It says I should have got this when I get access to the API.
But after going to the link, I didn't find too many information on this, rather, it has another link which takes me to the page where I have already created a service account.
After summarizing, my question is - I have created a service account and downloaded the key as JSON. But how to get this access_token the given snapshot asking for? The JSON file itself doesn't contain such access_token, rather it contains other information including type, project_id, private_key, client_id etc.
The process is not described directly in the link given in the question. Rather we will follow the steps mentioned in Play Developer API | Authorization
The whole process actually has two major steps:
Making a OAuth 2.0 client ID and downloading it.
Using client_id, client_secret and redirect_uris from this download JSON file to make API call.
Making OAuth 2.0 client ID and getting parameters
In order to do this:
Go to Google Play Console.
Use your play console account to login into it.
Make sure the right project is selected, at top there is a drop-down, where the correct project is supposed to be selected.
Now from + CREATE CREDENTIALS button create a OAuth Client ID and after successful creation you will find it listed under Credentials tab. The Credentials tab is at the left side of the page.
Now download the OAuth Client ID and it will be saved as a JSON file.
Open the JSON file and collect the client_id, client_secret and redirect_uris from there. Here redirect_uris will contain a list of URLs. One of them is http://localhost, we don't need it. Please take the other one, somewhat like urn:ietf:wg:oauth:2.0:oob.
Now the second step begins:
Make the API call
Now go to the first link I provided in the answer, i.e: Play Developer API | Authorization. We just did the first step under initial configuration. Now the second step begins. Make sure you are using the same browser where you are already logged-in on Google Play Console.
Now fill-up the fields in this link as mentioned in the documentation
with the information we just got (client_id, client_secret,
redirect_uris), remove the ... and put your redirect_uri and
client_id there:
https://accounts.google.com/o/oauth2/auth?scope=https://www.googleapis.com/auth/androidpublisher&response_type=code&access_type=offline&redirect_uri=...&client_id=...
Now after filling up your credentials in this link provided paste this link to browser and go to this URL.
This may require you to authorize this request by signing in with your account (with the Google Play Console Account we are using so far).
After authorization you will be given a code parameter similar to 4/eWdxD7b-YSQ5CNNb-c2iI83KQx19.wp619..... (This is also mentioned in the documentation you may follow the steps there).
Now go to the step 4 in the documentation (following is a snapshot):
replace the credentials which are here inside <..> (including < and >) with the information we so far collected. Here <the code from the previous step> is nothing but the code parameter 4/eWdxD7b-YSQ5CNNb-c2iI83KQx19.wp619.... we got.
Now make this API call. To make this kind of API calls you may need to use Bulk edit of Postman software (download and install the software). But if you are not comfortable with this Bulk edit, I am giving you a similar form data in the following snapshot. Just fill up the fields there in Postman and make the API call, (Please note that the method is selected POST):
Also you need not change the grant_type (its value is authorization_code).
Now clicking Send you should get the response which will contain access_token. Following is a snapshot of the response that comes with the access_token we are looking for (snapshot got from the documentation):
This response will come only once (for a certain code), to get another response you may need another code. So, save this response as a JSON from Postman to use it further.
Now you are done! Use this access_token and make API calls to get reply to reviews. More details here. Also please note that you might not get any reviews at all with this call, as this reviews' responses only work for recent time. If you make some recent comment in Play Store under your desired app they will be returned but the older comments will not be returned as response and the response might be blank {} if there are no recent comments. As mentioned in the documentation:
Note: You can retrieve only the reviews that users have created or modified within the last week. If you want to retrieve all reviews for your app since the beginning of time, you can download your reviews as a CSV file using the Google Play Console.

My Google API keeps returning a limit reached error, when I am sure I am under the limit

I am currently building a NodeJS backend app that is querying the Google Calendar API. I have setup a new project on Google Cloud API platform and have generated all the required credentials. As stated by the google calendar API page, the allowed queries per day is 1,000,000. Since I am only querying for testing purposes at the moment, I am sure that I haven't even hit a 100. Yet whenever I try to query the API it returns the error:
"The API returned an error: Error: Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup."
Also I have noticed that the dev console has generated a API key for me. Where am I supposed to put that?
My initial thinking is that Google API requires me to perform an additional signup using some CLI tools or something along those lines to signup. If not, where am I supposed to sign up?
Thanks in advance.
Note: I already have all the information from the cloud platform such as client_id, client_secret, project_id.
In "Error: Daily Limit for Unauthenticated Use Exceeded", they key word is Unauthenticated. Your request to the Calendar API is missing an OAuth Access Token. You will need to research Google OAuth.
This question has been answered many times. Please learn how to search SO for similar questions whenever you post a new question. https://stackoverflow.com/search?q=google+oauth+%22daily+limit+for+unauthenticated%22
To anyone who comes across this post in the future. I fixed the issue by using the project generated by Google Calendar API site (https://developers.google.com/calendar/quickstart/nodejs) by clicked the big blue "Enable the google calendar api" and then changing the name of the quickstart project that was generated. I don't know why it works now but it does and it's been working quite stably so far. Lets see how to goes.

Can't link google play game services to an app because the client id is in use. However there is no app using that id

I'm trying yo update a game on google play to support leaderboards and achievements. (https://play.google.com/store/apps/details?id=com.rightpedalstudios.dragonseason)
However, when I go to link the app I get the message "This client ID is globally unique and is already in use."
I've searched online for people who have had the same problem and the advice they are given is to delete the client ID in the developer console, and if the app has been deleted there then undelete it first. However, there is nothing in the console using the ID, nor is there any deleted apps. As far as I can tell there is no app using the client id.
I did find another person asking a similar question here that was never answered.
Failing to create client ID, due to duplication of signing fingerprint by another Android OAuth2 client
I also get the message "The signing fingerprint you specified is already used by another Android OAuth2 client." When I try to set up a client ID from the developer console. (I know I'm not meant to do that if I'm using google play games, I just wanted to check if it failed from there too.)
I've tried contacting google support, I was directed to the google API support, and then directed here.
Two other developers that have worked on this project could have somehow created a client ID. Although I have contacted them and neither of them recall creating one.
Is there anyway to find out where this client ID is being used?
You have to delete the client id in the Google API console (now confusingly renamed the Google Developers Console !). Then you can link the app to the game straight away. I have just done this, and it worked fine for me. I wanted to link an existing app to a different game, so I deleted both the debug and prod(release) definitions and was able to immediately link the app to the new game.
Note that for many of us, doing work on Google Play Game Services in the Google API console is a last resort - many of us have encountered Google related bugs in the past by doing this !
This image may help:

Add user review to Google map from my application(Android)

I am trying to create a location-based services Android application. I had successfully getting the user reviews from Google Places API by following the guidance from this link.
https://developers.google.com/places/documentation/details
I also found many posts regarding how to get user reviews from Google Places. But Now I want to create a function which user can insert reviews from my application. Is there anyway to do that?
Thanks.
No. There is no API for writing review. Also the Google+ mobile URL doesn't have the write review option from last year. Its a bug , but Google is not fixing this.
There is only one way to write review is through desktop URL. I have a similar location base app in play store where I have done some workaround to show desktop site to write review.

Resources