Getting an OAuth token

Before you start using the Track & Trace API, get an OAuth token.

The token can be revoked. For information about why, see Revoke a token. If your token was revoked, you have to get a new one.

To work with the Track & Trace API, your OAuth token must:
  1. If necessary, create an account in Yandex ID. When registering, use a corporate or any other email address on Yandex Mail.
  2. Log in to Yandex with the account you will use to upload data.
  3. Open the Create app page in Yandex Oauth.
  4. In the New client section, fill in the Service name field.

    The application name can be anything. It will appear in your application list in the Yandex OAuth service.

    Service description, Service icon, and Link to website fields are all 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 an OAuth token you already received in a request, Callback URI #1 isn't called.
  6. In the Permissions section:
    1. Find Yandex 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 value obtained in step 7 in the<your-app-id> field.<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 string that appears on the screen: this is your OAuth token.
    5. Make sure the token works. To do this, add it to the request header:
      curl -H "Authorization: Auth <your-OAuth-token>" -X GET
      Copied to clipboard

    For more information about OAuth, see OAuth implementation at Yandex.

Contact support