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개 답변
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
전문가
Uri
답변함 2년 전
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
전문가
답변함 2년 전
0

Hi

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

please advise some solution

Thanks Siddharth Maheshwari

답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠