Refresh access token
curl --request POST \
--url https://staging-api.usetyms.com/v1/adam/oauth/refresh/token \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"refresh_token": "oauth_refresh_token",
"business_id": "business-uuid"
}
'import requests
url = "https://staging-api.usetyms.com/v1/adam/oauth/refresh/token"
payload = {
"refresh_token": "oauth_refresh_token",
"business_id": "business-uuid"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({refresh_token: 'oauth_refresh_token', business_id: 'business-uuid'})
};
fetch('https://staging-api.usetyms.com/v1/adam/oauth/refresh/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"message": "Business access token retrieved successfully",
"data": {
"access_token": "new_oauth_access_token",
"refresh_token": "new_oauth_refresh_token",
"expires_at": "2026-06-16T16:30:00+00:00",
"token_type": "Bearer",
"business_id": "business-uuid"
}
}{
"status": "failed",
"message": "<string>"
}OAuth
Refresh access token
Obtain a new access token using a refresh token. Requires your app secret key in X-API-Key.
POST
/
oauth
/
refresh
/
token
Refresh access token
curl --request POST \
--url https://staging-api.usetyms.com/v1/adam/oauth/refresh/token \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"refresh_token": "oauth_refresh_token",
"business_id": "business-uuid"
}
'import requests
url = "https://staging-api.usetyms.com/v1/adam/oauth/refresh/token"
payload = {
"refresh_token": "oauth_refresh_token",
"business_id": "business-uuid"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({refresh_token: 'oauth_refresh_token', business_id: 'business-uuid'})
};
fetch('https://staging-api.usetyms.com/v1/adam/oauth/refresh/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"message": "Business access token retrieved successfully",
"data": {
"access_token": "new_oauth_access_token",
"refresh_token": "new_oauth_refresh_token",
"expires_at": "2026-06-16T16:30:00+00:00",
"token_type": "Bearer",
"business_id": "business-uuid"
}
}{
"status": "failed",
"message": "<string>"
}Authorizations
Business secret tyms_sk_... for business-scoped routes. Partner secret for register-business and referred-business distributor routes.