I am trying to use aws api gateway authorizer with cognito user pool. It is working fine when i test using aws api gateway console.
But when i try enabling the authorization in the api it says "message": "Unauthorized".
Please check below screenshot
API Gateway Console Screenshot - This works fine
Postman Screen shot - Not working
Can someone help please.
FYI I have followed the instructions as mentioned here http://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-integrate-with-cognito.html
AWS Cognito User Pool will send verification code by email or sms and the user enters the code to get verified with the User Pool. User enters username and password and logs in with Cognito User Pool in which case a token will be provided by Cognito upon successful login.
Amazon Cognito enables simple, secure user authentication, authorization and user management for web and mobile apps. With Cognito, a user or visitor can sign in with a username and password through Amazon, or through a third party like Facebook, Google or Apple.
In my case, authorization code should be id_token
. I made a mistake for using access_token
instead
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With