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.
-
Go to the
rsw-reference/scripts
folder. -
Run
rushx build
to retrieve all required dependencies. -
Run
STAGE=<STAGE> node generateCognitoTokens.js
. 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.<userName>
'<password>
' -
In the console output, use the
accessToken
,csrfCookie
, andcsrfToken
provided to make authenticated API requests.