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.
  1. If necessary, create a Yandex ID account. When registering, use a corporate or any other email address on Yandex Mail.
  2. Log in to Yandex with the username you will use to upload data.
  3. Open the app creation page in Yandex Oauth.
  4. 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.

  5. In the Platforms section:
    1. Select Web services.
    2. 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.
  6. In the Permissions section:
    1. Find Yandex Courier (courier).
    2. Expand the list and select Logistics Coordinator role - Load courier and order information, export results (courier:logistician).
  7. 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.
  8. Get the OAuth token. To do this:
    1. Open the link. Enter the substitute value from paragraph 7 in the <your-app-id> field.
      https://oauth.yandex.com/authorize?response_type=token&client_id=<your-app-id>
    2. Make sure the service prompts you to log in under the correct username.
    3. Click Log in as <username>.
    4. Copy the sequence of characters that appeared on the screen — this is your OAuth token.
    5. 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/test
      Copied to clipboard
    Note.

    For more information, see OAuth implementation in Yandex in OAuth in Yandex.

Contact support