Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

427
Views
How can I add authentication scope to a GET method on googles API?

I have made a script that exchanges my google token for a fresh access key.

Now, I want to check a IAP purchase with my access token (to authenticate).

The google documentation (https://developers.google.com/android-publisher/api-ref/purchases/products/get) says I must use this GET method:

GET https://www.googleapis.com/androidpublisher/v2/applications/packageName/purchases/products/productId/tokens/token

How do I add my access_token to this url to authorize my app to successfully get the data I need returned by the GET method?

I tried:

"https://www.googleapis.com/androidpublisher/v2/applications/flarehubpe.xflare.flarehub/purchases/products/flarehubvip/tokens/fraudtoken_shouldfail" . "&access_token=" . $accessToken

But I get the error:

{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "required",
    "message": "Login Required",
    "locationType": "header",
    "location": "Authorization"
   }
  ],
  "code": 401,
  "message": "Login Required"
 }
}

How should I authenticate? What am I doing wrong?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Just add your access_token in the header of request along with url.

Example : Bearer "your access_token"

enter image description here

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!