Applications use the OAuth 2.0 protocol to access Yandex Tracker API.
If your app is written in Python, you can use our Python client with the API.
Get access to the API
OAuth 2.0 allows applications to access Yandex services on behalf of the user. For information about basic OAuth concepts and the Yandex implementation of the protocol, see the "OAuth authorization. Developer's guide".
To get access to Yandex Tracker API:
Register your application and configure its read and write access rights in Tracker.
Obtain an OAuth token for authorization.
In requests to the Tracker API API, specify the following headers:
Authorization: OAuth <your OAuth token>
X-Org-Id: <your organization ID>
To find your organization's ID, go to the Tracker settings page. The ID is shown in Organization ID for API.
To check if you have access to the API, make a request for information about the current user.
If no access permission is granted, you'll get a response with code
The token permissions correspond to the permissions for the Tracker account. For example, if the user isn't allowed to change queue settings, API requests to change queue settings won't be available using this token.
When developing applications in Python, you can use the yandex_tracker_client package, a client that makes it easier to work with Tracker API.
To start using the client:
Download and install the latest version of Python from the official site.
Run the following command in your OS command line:
pip install yandex_tracker_client
Receive your OAuth token and organization ID to access the API. For more information about how to do this, see the Tracker API documentation.
Initialize the client in your program's code:
from yandex_tracker_client import TrackerClient
client = TrackerClient(token=<token>, org_id=<org_id>)
<token>is your OAuth token, and
<org_id>is your organization ID.