Getting an OAuth token
To start working with the Track & Trace API, get the company's OAuth token.
Attention. An OAuth token must be created for this company ID's administrator account.
- If necessary, create a Yandex ID account. When registering, use a corporate or any other email address on Yandex.Mail.
- Log in to Yandex with the username you will use to upload data.
- Open the app creation page in Yandex.OAuth.
- In the New client section, fill in the App name field.
The application name can be anything. It will appear in your application list in the Yandex.OAuth service.
App description, App icon, and URL to app site are optional.
- In the Platforms section:
- Select Web services.
- Click the Set URL for development link under the Callback URI #1 field.Note. If you use a pre-received OAuth token in a request, Callback URI #1 isn't called.
- In the Permissions section:
- Find Yandex.Courier (courier).
- Expand the list and select Logistics Coordinator role - Load courier and order information, export results (courier:logistician).
- At the bottom of the page, click Create app.This opens the application page. You'll need the app ID from the ID field to get an OAuth token.
- Get the OAuth token. To do this:
- Open the link. Enter the substitute value from paragraph 7 in the
- Make sure the service prompts you to log in under the correct username.
- Click Log in as <username>.
- Copy the sequence of characters that appeared on the screen — this is your OAuth token.
- Make sure the token is working. To do this, add it to the request header:
curl -H "Authorization: Auth <your-OAuth-token>" -X GET https://courier.yandex.ru/api/v1/testCopied to clipboard