Create integrated account token
/integrated-account/token
Integrated account tokens allow you to create an API Key of sorts which is scoped to a particular integrated account.
The most common use case for an integrated account token is to show the RapidForm UI to the user after they have already connected an account while back, to make some changes to their selections.
Integrated account tokens can be used similar to your Truto API Key by adding them to the Authorization header with Bearer token format.
Integrated account tokens support the following endpoints,
ALL /proxy(Proxy API)ALL /unified(Unified API)ALL /custom(Custom API)GETandPOST /link-token/post-connect-formGET /integrated-account/mePATCH /integrated-account/meIntegrated account tokens are valid for 15 minutes.
Reading the stored credentials
A token minted by this endpoint is a backend credential, and GET /integrated-account/me answers it with the account's decrypted upstream credentials in the context object — the OAuth access_token and refresh_token, API keys, and so on.
Truto mints the same token type at the end of a connection flow and returns it to the connecting browser (as integrated_account_session_token) so the Link SDK can finish setting the account up. Those tokens do not read credentials. They are answered with the same redacted context every other caller gets, except that an integration whose browser file picker cannot work without it — currently Google Drive and Box, whose picker SDKs take the token client-side — also receives context.oauth.token.access_token. A refresh_token is never returned to a connect-flow token, whatever the integration.
So: treat a token from this endpoint as equivalent to an API key for that one account, keep it server-side, and do not pass it to a browser. If a browser needs one, use the token the connect flow already gave it.
Request Body
The ID of the integrated account you want to scope the token to.
1ba1f401-7183-47c5-9e39-e8e257e3c795Response Body
The integrated account token that can be used to make API calls.
1ba1f401-7183-47c5-9e39-e8e257e3c795truto accounts create-token '<id>' -o jsonimport asyncio
from truto_python_sdk import TrutoApi
truto_api = TrutoApi(token="<your_api_token>")
async def main():
result = await truto_api.integrated_accounts.create_integrated_account_token("<id>")
print(result)
asyncio.run(main())curl -X POST 'https://api.truto.one/integrated-account/token' \
-H 'Authorization: Bearer <your_api_token>' \
-H 'Content-Type: application/json' \
-d '{
"integrated_account_id": "1ba1f401-7183-47c5-9e39-e8e257e3c795"
}'const body = {
"integrated_account_id": "1ba1f401-7183-47c5-9e39-e8e257e3c795"
};
const response = await fetch('https://api.truto.one/integrated-account/token', {
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/token"
headers = {
"Authorization": "Bearer <your_api_token>",
"Content-Type": "application/json",
}
params = {
}
payload = {
"integrated_account_id": "1ba1f401-7183-47c5-9e39-e8e257e3c795"
}
response = requests.post(url, headers=headers, params=params, json=payload)
print(response.json())