OAuth 2.0 — получение токена по Client Credentials
curl --request POST \
--url https://seller-api.teez.kz/api/v1/auth/token \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clientId": "client",
"clientSecret": "secret"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({clientId: 'client', clientSecret: 'secret'})
};
fetch('https://seller-api.teez.kz/api/v1/auth/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://seller-api.teez.kz/api/v1/auth/token"
payload = {
"clientId": "client",
"clientSecret": "secret"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"accessToken": "<string>",
"expiresIn": 123,
"tokenType": "<string>"
}{
"statusCode": 400,
"message": "One or more errors occurred!",
"errors": {}
}Auth
OAuth 2.0 — получение токена по Client Credentials
Обмен client_id и client_secret на access token. Требуемые параметры:
- client_id — идентификатор клиента
- client_secret — секрет клиента
Возвращает:
- accessToken: токен
- expiresIn: срок действия токена в секундах
- tokenType: тип токена
POST
/
api
/
v1
/
auth
/
token
OAuth 2.0 — получение токена по Client Credentials
curl --request POST \
--url https://seller-api.teez.kz/api/v1/auth/token \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clientId": "client",
"clientSecret": "secret"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({clientId: 'client', clientSecret: 'secret'})
};
fetch('https://seller-api.teez.kz/api/v1/auth/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://seller-api.teez.kz/api/v1/auth/token"
payload = {
"clientId": "client",
"clientSecret": "secret"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"accessToken": "<string>",
"expiresIn": 123,
"tokenType": "<string>"
}{
"statusCode": 400,
"message": "One or more errors occurred!",
"errors": {}
}