The Job Management 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 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 Job Management API access token.
An example request 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
An alternative URL-encoded example request is shown below.
curl --location --request POST
'https://serviceaccounts.liveramp.com/authn/v1/oauth2/token?grant_type=password&client_id=liveramp-api&username=${serviceAccountName}&password={${serviceAccountPassword}}' \
--header 'Content-Type: application/x-www-form-urlencoded'
Your access token request includes the following variables.
grant_type | The value must be password. |
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": "token",
"token_type": "Bearer",
"expires_in": 1800,
"scope": "liveramp-api"
}
Use the access_token from the response to authorize Job Management API calls.
Authorization: Bearer ${access_token}
About access token expiration
Access tokens expire quickly. See the
expires_invalue for the time limit. The example above shows 30 minutes (1800 seconds). To insure that calls to Job Management API endpoints are successful, set up an automated way to fetch new access tokens.