curl --request POST \
--url 'https://gateway.amana.io/auth/refresh' \
--header 'Content-Type: application/json' \
--data '{
"refresh_token": "<string>"
}'
import requests
url = "https://gateway.amana.io/auth/refresh"
headers = {"Content-Type": "application/json"}
payload = {
"refresh_token": "<string>"
}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.json())
const response = await fetch('https://gateway.amana.io/auth/refresh', {
method: 'POST',
headers: {"Content-Type": "application/json"},
body: JSON.stringify({"refresh_token": "<string>"}),
});
console.log(await response.json());
{
"access_token": "<string>",
"refresh_token": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
Authentication
Refresh access token
Exchange a refresh token for a new access token. Use this when the access token expires instead of asking the user to log in again.
POST
/
auth
/
refresh
curl --request POST \
--url 'https://gateway.amana.io/auth/refresh' \
--header 'Content-Type: application/json' \
--data '{
"refresh_token": "<string>"
}'
import requests
url = "https://gateway.amana.io/auth/refresh"
headers = {"Content-Type": "application/json"}
payload = {
"refresh_token": "<string>"
}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.json())
const response = await fetch('https://gateway.amana.io/auth/refresh', {
method: 'POST',
headers: {"Content-Type": "application/json"},
body: JSON.stringify({"refresh_token": "<string>"}),
});
console.log(await response.json());
{
"access_token": "<string>",
"refresh_token": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
Body
Content type:application/json
string
Response
200 Success.
string
string
Possible Errors
| Error | Possible cause | What to do |
|---|---|---|
| 400 | Invalid or missing field | Check the request against the schema. |
| 401 | Token missing or expired | Log in again or use the refresh token. |
| 403 | IP not whitelisted, or account restricted | Confirm your IP is whitelisted; otherwise contact Amana. |
| 429 / 5xx | Rate limit, or temporary issue on our side | Retry with backoff; contact support if it persists. |
curl --request POST \
--url 'https://gateway.amana.io/auth/refresh' \
--header 'Content-Type: application/json' \
--data '{
"refresh_token": "<string>"
}'
import requests
url = "https://gateway.amana.io/auth/refresh"
headers = {"Content-Type": "application/json"}
payload = {
"refresh_token": "<string>"
}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.json())
const response = await fetch('https://gateway.amana.io/auth/refresh', {
method: 'POST',
headers: {"Content-Type": "application/json"},
body: JSON.stringify({"refresh_token": "<string>"}),
});
console.log(await response.json());
{
"access_token": "<string>",
"refresh_token": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
Last modified on October 8, 2026
