Obtain Access Token for making authenticated API requests - Research Service Workbench on AWS

Obtain Access Token for making authenticated API requests

Note

If you are trying to obtain a token for a user still using their temporary password, you must first reset their password.

  1. Go to the rsw-reference/scripts folder.

  2. Run rushx build to retrieve all required dependencies.

  3. Run STAGE=<STAGE> node generateCognitoTokens.js <userName> '<password>' . Choose a user that has been created for your RSW deployment. The quotes around <password> is necessary for the script to correctly parse passwords which include symbols.

  4. In the console output, use the accessToken, csrfCookie, and csrfToken provided to make authenticated API requests.