How to get a new access token using AWS Cognito CUSTOM_AUTH flow?

In my app, I have created a passwordless CUSTOM_AUTH flow for AWS Cognito. This means that the user enters their email in the app and then receives an OTP in their inbox which is then entered in the app. The app receives an ID token, a refresh token and an access token from AWS Cognito.

Alternatively, I can also use the AWS CLI with the two commands:
**aws cognito-idp initiate-auth --auth-flow CUSTOM_AUTH --auth-parameters USERNAME=<email> --client-id <Cognito App Client ID>**

**aws cognito-idp respond-to-auth-challenge --client-id <Cognito App Client ID> --challenge-name CUSTOM_CHALLENGE --session "<Session>" --challenge-responses USERNAME=<email>,ANSWER=<Code received via email>**

I’m testing my REST API with Postman, but it’s annoying for me to always have my demo app get an access token and then copy it into Postman (Bearer Token).

I’m wondering how I can configure Postman to follow the passwordless CUSTOM_AUTH flow with OTPs. Or alternatively, that I can at least insert the refresh token so that Postman can get itself an access token.

Thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.