OAuth2
We currently implement a system similar to OAuth2 with the followinggrant_type:
password: Requires ausername(which is generally the user’s email) and apassword.refresh_token: Requires a validrefresh_token
client_id for each grant. If you don’t have one, please contact us at [email protected] to obtain one.
Getting Tokens
The endpoint used to retrieve tokens isPOST https://api.reelevant.com/v2/auth/token with a application/json Content-Type.
Using Username and Password
Here is an example to get tokens based on ausername/password:
Using Refresh Token
And here is if you already have arefresh_token:
Using Access Tokens
After getting a validaccess_token, you’ll need to add it for every call to the gateway within the Authorization header like so:
Token expirationsAccess tokens are valid for 1h after creation whereas refresh tokens are valid for 30 days starting from the last access token generation (so if you refresh it once a month, it doesn’t expire).