The Referral Authentication api allows you to retrieve a JWT token to use with the authenticated referral api endpoints.
⚠️ API version 1.0.8 is scheduled for deprecation on 2027-07-01.
It will continue to function until then; please migrate to 2.x.x.
With the Referral Authentication API, you can:
- Retrieve a JWT token to authenticate your B2B api calls.
- Rotate your
client_secret.
One must pay attention to the token expiry, a token is valid for the entiity of its life.
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.
API Call Example:
- Productionhttps://api.raipartners.com/referral/auth/token
- Sandboxhttps://sandbox.raipartners.com/referral/auth/token
curl -i -X POST \
https://api.raipartners.com/referral/auth/token \
-H 'API-Version: 1.0.8' \
-H 'Content-Type: application/json' \
-d '{
"client_id": "my-client-id",
"client_secret": "my-super-auth-secret"
}'API Call Response Example:
{ "scope": "read:user write:user", "refresh_expires_in": 300, "access_token": "eyo.....", "expires_in": 300, "token_type": "Bearer", "not-before-policy": 0 }
Trigger a client_secret rotation per your company's policy
- A successful response confirms that the secret has been rotated and provides new secret value.
API Call Example:
- Productionhttps://api.raipartners.com/referral/auth/client-secret/rotation
- Sandboxhttps://sandbox.raipartners.com/referral/auth/client-secret/rotation
curl -i -X POST \
https://api.raipartners.com/referral/auth/client-secret/rotation \
-H 'API-Version: 1.0.8' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'API Call Response Example:
{ "secret": "string" }