About Data Marketplace Buyer API Authentication

Learn about the Data Marketplace Buyer API authentication process.

LiveRamp implements the OAuth 2.0 Authorization framework. OAuth provides secure API authorization in a simple and standardized way from desktop and web applications.

The Data Marketplace Buyer API requires a bearer access token that is included in the Authorization header. The LR-Org-Id header is also required and must be passed with your Org ID. All Data Marketplace Buyer API endpoints require these headers.

You can test the Data Marketplace Buyer API directly from the documentation using the Try It link. When requested, enter your bearer access token and the Org ID.

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.

Request Headers

LR-Org-Id

The credentials file you receive from your LiveRamp Service Account Representative should include the owner_org field which is your Org ID. You will also need to use this value in the header.

The type attribute in the file will return information on the service account version (either "v1" or "v2).

Example

An access token request example 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

An access token request example 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

A response example is shown below.

{ "access_token":"920d8f37-5e10-453a-8e87-8e28ae37cc90","token_type":"Bearer","expires_in":600 }

Use the access_token in the Data Marketplace Buyer API call.

-H 'Authorization: Bearer 920d8f37-5e10-453a-8e87-8e28ae37cc90'

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 Buyer API endpoints are successful, set up an automated way to fetch new access tokens.

Following the OAuth 2.0 specification, a refresh token is not allowed. A new token request must be made to obtain a new access token. TLS is required.