Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

430
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda