In this process you will use the values retrieved in the previous steps, to generate a refresh token. The refresh token is required when setting up the connection on Hunters.
To generate a refresh token:
Open your terminal and run the following command after replacing the {client_id}, {client_secret} and {authorization_code} variables with the information collected in the previous steps:
curl -X POST \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "code=AUTHORIZATION_CODE" \ -d "client_id=CLIENT_ID" \ -d "client_secret=CLIENT_SECRET" \ -d "redirect_uri=http://localhost:5110" \ -d "grant_type=authorization_code" \ -d "scope=https://manage.office.com/ActivityFeed.Read" \ https://login.microsoftonline.com/YOUR_TENANT_ID/oauth2/v2.0/token
An access token and a refresh token will be returned.Copy and paste both values into a notepad for future use:
Access token - use it in the next steps to start subscriptions (if required).
Refresh token - use it when setting up the connection on the Hunters platform.