This quickstart guide will help you get started with the Referral API, allowing you to make your first API call.
- Login your email.
- Look for an email from raipartners.com with subject Referral API.
- Grab your client_id and initial client_secret.
Your client_id and client_secret are required to authenticate all API requests.
Let's start by rotating your client_secret to replace your existing client_secret.
Before you can call any API endpoint, you must authenticate using the client_id and client_secret originally provided by your RAI Partners' Client Success representative via email.
Use the following curl command to authenticate:
curl -X POST https://api.raipartners.com/referral/auth/token \
-H "Content-Type: application/json" \
-H 'accept: application/json' \
-H 'API-Version: 2.0.0' \
-d '{
"client_id": "<YOUR_CLIENT_ID>",
"client_secret": "<YOUR_CLIENT_SECRET>"
}'client_id: The client_id assigned to your company.client_secret: The associated client secret.
{
"scope": "read:user write:user",
"refresh_expires_in": 300,
"token_type": "Bearer",
"not-before-policy": 0,
"access_token": "eyo.....",
"expires_in": 300
}Grab the access_token value from the authentication cal then use the following curl command to rotate the client_secret:
curl -X POST https://api.raipartners.com/referral/auth/client-secret/rotation \
-H "Content-Type: application/json" \
-H 'accept: application/json' \
-H 'API-Version: 2.0.0' \
-H Authorization: Bearer YOUR_ACCESS_TOKEN{
"secret": "PX4eWb9rcRT1RBqvLw4GtuqyoUFWoGLr"
}This response confirms that the client_secret has been successfully rotated and provides the new client_secret.