Reads:2143Replies:1
401 Error
How can I troubleshoot "401 Unauthorized" errors from an API Gateway REST API endpoint once I've set up an Cognito user pool? I tried to set up my Cognito user pool as a Cognito user pool on my API Gateway REST API. Now I get "401 Unauthorized" errors in the API response. How can I troubleshoot these errors?
Id token payload: { "sub": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "aud": "xxxxxxxxxxxxexample", "email_verified": true, "token_use": "id", "auth_time": 1500009400, "iss": "https://cognito-idp.us-east-1.com/us-east-1_example", "cognito:username": "janedoe", "exp": 1500013000, "given_name": "Jane", "iat": 1500009400, "email": "janedoe@example.com" These errors came through my online classes of AWS DevOps certification. Access token payload: "auth_time": 1500009400, "exp": 1500013000, "iat": 1500009400, "iss": "https://cognito-idp.us-east-1.com/us-east-1_i", "scope": "aws.cognito.signin.user.admin", "sub": "aaaaaaaa-bbbb-cccc-dddd-5555555e", "token_use": "access", "username": "janedoe@example.com" } |
|
1st Reply#
Posted time:Nov 15, 2021 6:59 AM
Hi,
How are you trying to pass the authentication token/credential in the SDK? |
|
|