2
votes

How do I call API gateway with postman with cognito?

Tried to use AWS Signature in postman and this did not work.

https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-use-postman-to-call-api.html

I am using hosted UI in cognito if that makes a difference. I see that there is an Oauth 2.0 option in postman but dont know how to fill out the fields.

So my api works when I pass Authorization in the header with the id_token. Without the id_token is there any other way?

thanks

1

1 Answers

1
votes

If you are using a Cognito user pool and have your API Gateway authorizer set to user pool, then you need to pass either the id or access token in the Authorization header.

If you are using a Cognito identity pool and have your API Gateway authorizer set to AWS_IAM you need to use AWS signatures