Creating and using an API Key token
To work with Yandex.Market via the API:
- Create a token with access to certain groups of methods. This way, employees will be able to call only the methods they need for their work. What types of access are available
- Insert the token in the header of the Yandex.Market request.
Only the cabinet owner and cabinet manager can create and manage tokens. For more information about what roles are available, read in the Help of the Market for sellers.
The maximum number of tokens for the cabinet is 30.
Create a token
-
In the cabinet in the lower left corner, click on the name of your business and go to the page Modules and APIs.
-
In the block Authorization token Click the button To create or Create a new token if you have already received it.
-
In the window that opens:
-
Specify the unique name of the token.
-
Select one or more access points for this token.
-
Click the button To create.
-
Edit the token
Before editing
Make sure that your integration will continue to work with the modified token.
You can change access rights, as well as the name of the token. To do this:
-
In the cabinet in the lower left corner, click on the name of your business and go to the page Modules and APIs.
-
In the block Authorization tokens find the one you need, tap the three dots next to it and select Edit.
-
Change the required information.
-
Click Save.
The information will be updated within 10 minutes.
Delete a token
Before deleting
Make sure that your integration will continue to work without this token.
-
In the cabinet in the lower left corner, click on the name of your business and go to the page Modules and APIs.
-
In the block Authorization tokens find the one you need, tap the three dots next to it and select Remove.
-
Confirm the deletion.
Transfer the token
Insert the received token into the header Api-Key
according to the following scheme:
Api-Key: <token>
As a result, the title will look like this:
Api-Key: ACMA:I4c4CxCSYaI41RSC2uYWP2qj3Rhhm4knMiBEga5K:151c0664
If the request is received without a header with a valid token, the Market returns an error. 401 Unauthorized
.
It may be useful
- The method of obtaining information about the transferred authorization token
- Description of errors returned by the Yandex.Market API