Authorization
To use the Turbo page API, you must authorize with the OAuth token. You have to send the token in every request in the Authorization HTTP header.
curl -X GET \ 'https://api.webmaster.yandex.net/v4/user' \ -H 'Authorization: OAuth oauth_token'
Copied to clipboard
If an API method is called without a token, or a request passes an invalid token, the server returns the HTTP status 401 Unauthorized
.
Getting OAuth token
You can get an authorization token for the Yandex.Turbo pages API using one of the following methods:
- Through Yandex.Webmaster
-
- Go to thepage.
- In the Upload via API block, click the Get token button.
- Through Yandex.OAuth
-
- Register your site in the OAuth service.
When registering in the Platforms section, click the Web services, then click Set URL for development.
- In the Data access section, specify:
Enter the access name from the beginning of the line, without a space.webmaster:turbopages
- Get a token by clicking the link:
The application ID is available in the application properties (click the application name to open its properties).https://oauth.yandex.ru/authorize?response_type=token&client_id=<application ID>
Learn more about OAuth authentication in the service documentation.