Refresh credentials
/integrated-account/refresh-credentials
For integrated accounts that support it, you can use this endpoint to manually refresh the credentials for an integrated account. Manually refreshing the credentials is NOT necessary in most cases. Truto automatically refreshes the credentials for an integrated account whenever a proxy or unified API request is made to the integrated account and the credential is about to expire within a minute or has already expired.
Request Body
The ID of the integrated account you want to refresh the credentials for.
1ba1f401-7183-47c5-9e39-e8e257e3c795Response Body
truetruto accounts refresh-credentials '<id>' -o jsonimport Truto from '@truto/truto-ts-sdk';
const truto = new Truto({
token: '<your_api_token>',
});
const result = await truto.integratedAccount.refreshCredentials('<id>');
console.log(result);import asyncio
from truto_python_sdk import TrutoApi
truto_api = TrutoApi(token="<your_api_token>")
async def main():
result = await truto_api.integrated_accounts.refresh_credentials("<id>")
print(result)
asyncio.run(main())curl -X POST 'https://api.truto.one/integrated-account/refresh-credentials' \
-H 'Authorization: Bearer <your_api_token>' \
-H 'Content-Type: application/json' \
-d '{
"id": "1ba1f401-7183-47c5-9e39-e8e257e3c795"
}'const body = {
"id": "1ba1f401-7183-47c5-9e39-e8e257e3c795"
};
const response = await fetch('https://api.truto.one/integrated-account/refresh-credentials', {
method: 'POST',
headers: {
'Authorization': 'Bearer <your_api_token>',
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
});
const data = await response.json();
console.log(data);import requests
url = "https://api.truto.one/integrated-account/refresh-credentials"
headers = {
"Authorization": "Bearer <your_api_token>",
"Content-Type": "application/json",
}
params = {
}
payload = {
"id": "1ba1f401-7183-47c5-9e39-e8e257e3c795"
}
response = requests.post(url, headers=headers, params=params, json=payload)
print(response.json())