Getting an access token

We use Microsoft OAuth authentication endpoints with the client credentials flow. You can find Microsoft's documentation for the client credentials flow here.

Our technical support team will provide you with API credentials, including the following information:

  • client id (sometimes called application id)
  • client secret (sometimes called password)

Once you have API credentials, you can create an access token by calling the token endpoint.

🚧

Request the partners scope

When you request a token, set the scope to:

api://revenuestripe.onmicrosoft.com/partners/.default

This scope grants the permissions for all partner API endpoints — advertiser and publisher reporting, campaigns, creatives, and the performance reports. Requesting a different scope is the most common cause of a 401 response with the message "Not authorized to this endpoint.". Because a token requested for the wrong scope can still succeed on some endpoints, this often shows up only on specific endpoints (such as the performance reports). If you see that error, confirm your token was requested with the scope above.

You can then use the access_token value in the Authorization header for the API endpoints.

Authorization: Bearer <access_token>
Form Data
string
required

The client ID assigned to you

string
required

The client secret assigned to you

string
required
Defaults to client_credentials

The grant type. Always use client_credentials

string
enum
required

The scope for partner API access. Always use api://revenuestripe.onmicrosoft.com/partners/.default. This scope includes the permissions for all partner endpoints — advertiser and publisher reporting, campaigns, creatives, and the performance reports. Requesting a different scope commonly results in a 401 "Not authorized to this endpoint.", even if the same token works on other endpoints.

Allowed:
Responses

Language
LoadingLoading…
Response
Choose an example:
application/json