The Data Marketplace Buyer API requires an access token.
1. Request an Account ID and a Secret key from LiveRamp.
You need your account credentials to obtain an access token. Contact your LiveRamp Service Account representative for your username (Account ID) and your password (Secret Key). You should receive a JSON file that includes those credentials. If you need a LiveRamp Service Account, please reach out to your account manager.
2. Submit a request for a Data Marketplace Buyer API access token.
An example request for a v1 LiveRamp service account is shown below.
curl https://sso.liveramp.com/oauth2/default/v1/token \
-d grant_type=password \
-d username="$ACCOUNT_ID" \
-d password="$SECRET_KEY" \
-d scope=openid \
-d client_id="liveramp-api" \
-d response_type=token
>> need a python example <<
An example request for a v2 LiveRamp service account is shown below.
curl https://serviceaccounts.liveramp.com/authn/v1/oauth2/token \
-d grant_type=password \
-d username="$ACCOUNT_ID" \
-d password="$SECRET_KEY" \
-d scope=openid \
-d client_id="liveramp-api" \
-d response_type=token
Your access token request includes the following variables.
username | The Account ID from your service account. |
password | The Secret Key from your service account. |
client_id | liveRamp-api |
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":600 }
Use the access_token
from the response to authorize Data Marketplace Buyer API API calls.
Authorization: Bearer ${access_token}
About access token expiration
Access tokens expire quickly. See the
expires_in
value for the time limit. The example above shows 10 minutes (600 seconds). To insure that calls to Data Marketplace API endpoints are successful, set up an automated way to fetch new access tokens.