These docs are for v1.1. Click to read the latest docs for v2.9.0.

Perform OAuth Authorization

For destination platforms that require OAuth authorization before segments can be distributed, this endpoint enables your application user to perform OAuth authorization for a specified destination account.

When called with the destination account ID returned by the Activate a New Destination Account call, the API returns the destination platform’s authorization URL, where your user can perform the authorization.

Once your user completes the authorization on the destination platform, the API redirects to the endpoint specified in the “redirect_url” parameter and returns query parameters that allow your application to display the appropriate message to your user about the status of the OAuth authorization.

The optional “state” parameter will be returned in the redirect response and can be used to help your application identify the destination account that was authorized. See the “Your Application’s Redirect Endpoint” section below for more information.

Note: Any destination account whose "oauth_status" is anything other than “oauth_not_applicable” requires OAuth authorization to be performed before segments can be distributed.

Your Application’s Redirect Endpoint

The following query parameters are returned to your redirect endpoint once your application user completes the OAuth authorization on the destination platform. These parameters allow your application to display the appropriate message to your user about the status of the OAuth authorization.

Example Endpoint
https://my.app.com/oauth/handle_redirect

Query Params

status
An HTTP status code from the following: ok, internal_server_error, service_unavailable, unprocessable_entity. This will always be present to indicate the overall status of the authorization request and the Distribution API’s response.

state
If the state parameter was present in the request to create an OAuth request, this will be present and will be the exact value that the client application passed to the Distribution API as the state parameter.

error_code
A LiveRamp API error code. This will only be present if the Distribution API errored and will describe the type of error that occurred. The value can either be general or validation, though in most cases at this stage of the OAuth process, it will typically be general.

error_detail
Human-readable text providing additional information about the error. This is provided only if Distribution API errored and is used to assist the API user in understanding the error that occurred.

Language
Authorization
Header
Click Try It! to start a request and see the response here!