Learn how to authenticate to the RampID API.
1. Request an Account ID and a Secret key from LiveRamp.
You need your service account credentials to obtain an access token. Contact your LiveRamp representative for your client-id and client-secret.
Make sure to protect your credentials. You will be responsible for any traffic that uses your credentials.
2. Submit a request for an API access token.
curl https://us.identity.api.liveramp.com/token
-d "client_id=example-id&client_secret=example-secret&grant_type=client_credentials"
Your access token request includes the following parameters.
Parameter | Definition |
---|---|
grant_type | This form of authentication will always be client_credentials |
client_id | Provided by your LiveRamp representative |
client_secret | Provided by your LiveRamp representative |
If the access token request is valid and authorized, the token server issues the access token in the format shown below:
{ "access_token":"<access token>","token_type":"Bearer","expires_in":900 }
Use the access_token
from the response to authorize API calls via HTTP header or your HTTP client library's authorization method:
Authorization: Bearer ${access_token}
About access token expiration
Access tokens expire quickly. See the
expires_in
value for the time limit (expressed in seconds). The example above shows 15 minutes (900 seconds). To ensure that calls to API endpoints are successful, your code should fetch a new token if you receive a 403 status code for token expiration.Tokens should be shared for all calls within a thread but not refreshed for each call.