Authorization

In order to use the AppMetrica API, you need to get an access token from the Yandex.OAuth service. The token must be sent with all method requests in the HTTP Authorization header.

Example:

curl -X GET \
  https://api.appmetrica.yandex.ru/management/v1/applications \
  -H 'Authorization: OAuth 05dd3dd84ff948fdae2bc4fb91f13e22bb1f289ceef0037'
Copied to clipboard
Attention. Sending the token in the URL parameters is not supported.

If an API method is called without a token, or the request includes an invalid token, the server returns the HTTP status 401 Unauthorized.

Obtaining the OAuth token

To get an access token:

  1. Go to the app creation page.
  2. Enter the service name. Attach its icon (optional).
  3. In the App platforms section, select Web services. In the Redirect URI field, click Enter URL for debugging.
  4. In the Data access section, specify appmetrica:read and appmetrica:write. Enter access names from the beginning of the line, without a space.
  5. Specify a contact email address. At the bottom of the page, click Create app.
  6. Copy the ID of your app in the ClientID block and paste it into the link to get a debug token:
    https://oauth.yandex.ru/authorize?response_type=token&client_id=<app_id>

For more information, see OAuth documentation.

If you didn't find the answer you were looking for, you can use the feedback form to submit your question. Please describe the problem in as much detail as possible. Attach a screenshot if possible.