User authorization via tokens issued by the Yandex OAuth server.
The OAuth token is a special code that allows access to a specific user's data. Each user (Yandex.Direct username that API calls are made on behalf of) must get an individual token to specify when making calls.
For more information about OAuth authorization and various ways to get a token, see the OAuth guide.
Get a token
To get a token, the app must redirect the user to the access request page, which is a special page on the Yandex OAuth server. The user logs in on Yandex (with the username for Yandex.Direct) and grants the app access to personal data. The Yandex OAuth server generates a token and passes it to the app.
The procedure for getting a token is described in the OAuth authorization guide.
Using the token when calling methods
Discontinuation of a token
Situations that cause a token to become invalid and require getting a new token are listed in the section Revoking tokens in the OAuth guide.
If you are using an application, we recommend that you register a special representative in Yandex.Direct and get a token for the representative. See the section Recommendations for creating representatives in the documentation for the API version 5.