Authorization

In order to use the Yandex.Audience API, you need to get an access token from the Yandex.OAuth service. You must pass the token in the HTTP Authorization header for each method.

Example in the HTTP header:

GET /v1/management/segments HTTP/1.1
      Host: api-audience.yandex.com
      Authorization: OAuth 05dd3dd84ff948fdae2bc4fb91f13e22bb1f289ceef0037
      Content-Type: application/json
      Content-Length: 123

Getting an OAuth token

To get an OAuth access token, register your application. On the registration page, select these permissions:
  • Create segments, change the setting parameters of both your segments and delegated segments
  • Read setting parameters of both your segments and delegated segments

For more information about authorization, read the document OAuth authorization. Developer's guide. This guide contains recommendations for client application developers.

To find out how to get a debugging token for application development, see the section Debugging token.