Open SampleCode/Tutorial_1/GetRefreshToken.js in your IDE or text editor.
What is the Company Request Token used for?
Step 5
Type node GetRefreshToken.js in terminal to run the app to generate your credentials.json file. This generates messages in the terminal that show the credentials object.
Fill in the empty fields in this file with the information in the credential object.
Step 6
Run the app again. The app will call the Oauth2 /token endpoint using your credentials and generate your refresh token.
Check if your credentials were transferred from the JSON file to the credentials object.
Check for a successful validity check on the credentials object.
Check for a successful API call. The status code will be 2xx and the refresh token will be one of the refresh token object properties.