Cognito with API gateway integration

0

Hi

we are using Cognito user pool for the API gateway but somehow it shows below error

{"message":"Unauthorized"}

we are using token ID which works fine in test with API gateway but in case of URL call back it says {"message":"Unauthorized"}.

[Authorizers][1]

we have no idea what we are missing here

Thanks Siddharth Maheshwari

3 Respuestas
1

Did you add the token to the Authorization header with a "Bearer " prefix? If you did, I suggest that you enable execution logs on the API and check why it is failing.

profile pictureAWS
EXPERTO
Uri
respondido hace 2 años
0

Please take a look at this page - https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-enable-cognito-user-pool.html

Are you sending an identity token or an access token in the Authorization header in the request to API Gateway?

If you are sending the access token, you need to specify OAuth Scopes? Can you check if you have configured that in the API Gateway methods where you are enabling Cognito User Pools based authentication?

profile pictureAWS
EXPERTO
respondido hace 2 años
0

Hi

we have tried all possible ways, but are still struggling to fix it.

please advise some solution

Thanks Siddharth Maheshwari

respondido hace un año

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas