amazon web services – How to get a permanent access token from AWS Cognito for API authentication


I am using AWS Cognito User Pool for authentication purposes.

I am using React in frontend and express as backend.

The auth with React is working perfectly fine for me.

I want to give a single permanent token to my users to use it with API authentication.

User should be able to get this token from his dashboard. He can simply copy this token and simply start using it with the APIs.

Of course, the user can invalidate the token any time and generate a new one.

Any clue how to achieve this with AES Cognito?