I have a lot of question about google's api.
First I followed Erel's tutorial on how to use the Google Play Developer API (here) and I did successfully got the response of "http://127.0.0.1:51042/inventory?package=your.package.here" just like the tutorial showed.
But when I try to get the status of a user's subscription purchase(see this) with the following request:
Note: The token in the url is the token from the purchase, not the api access token.
I get this response:
Which is very confusing and left me with a lot of questions.
What does the access token obtained from the tutorial mean? It is tied to my gmail account? If so, it means it is some sort of personal access token safe to use in a server?
I also found this (here), apperantly you can access the api with a service account (with limited access) or an Oauth client, I believe the method I tried is Oauth.
I tried to access the api with a service account (I failed), which apparently are used to access without giving your personal credentials but I ended in a very complicated tutorial which I could not follow.
Googleing this issue I found this post in stackoverflow which is actually setting up a service account, which I couldn't. This post says it can get billing information.
What I'm looking to do is to take a user's purchase token, forward it to my server and get the purchase status from my server.
Thanks in advance.
First I followed Erel's tutorial on how to use the Google Play Developer API (here) and I did successfully got the response of "http://127.0.0.1:51042/inventory?package=your.package.here" just like the tutorial showed.
But when I try to get the status of a user's subscription purchase(see this) with the following request:
B4X:
"https://www.googleapis.com/androidpublisher/v3/applications/[packageName]/purchases/subscriptions/[subscriptionId]/tokens/[token]"
I get this response:
B4X:
ResponseError. Reason: Forbidden, Response: {
"error": {
"errors": [
{
"domain": "androidpublisher",
"reason": "projectNotLinked",
"message": "The project id used to call the Google Play Developer API has not been linked in the Google Play Developer Console."
}
],
"code": 403,
"message": "The project id used to call the Google Play Developer API has not been linked in the Google Play Developer Console."
}
Which is very confusing and left me with a lot of questions.
What does the access token obtained from the tutorial mean? It is tied to my gmail account? If so, it means it is some sort of personal access token safe to use in a server?
I also found this (here), apperantly you can access the api with a service account (with limited access) or an Oauth client, I believe the method I tried is Oauth.
I tried to access the api with a service account (I failed), which apparently are used to access without giving your personal credentials but I ended in a very complicated tutorial which I could not follow.
Googleing this issue I found this post in stackoverflow which is actually setting up a service account, which I couldn't. This post says it can get billing information.
What I'm looking to do is to take a user's purchase token, forward it to my server and get the purchase status from my server.
Thanks in advance.
Last edited: