Run post install actions
/integrated-account/run-post-install-actions
Some integrations require more information from the API to work. Truto runs some steps after an integrated account is connected and runs them. These can include things like making a request to the API and store some part of the response in the context attribute of the integrated account (Variables section).
This happens automatically when the integrated account is connected. But if you ever want to run it manually, then use this API.
An integrated account created with POST /integrated-account whose authentication method declares an rsa_key_pair generated field is the exception: the provider cannot have the key Truto just made, so the post-install and validation actions wait. Install the public key from the create response (context.<name>) with the provider, then call this endpoint.
Request Body
The ID of the integrated account you want to the post install actions for.
1ba1f401-7183-47c5-9e39-e8e257e3c795Response Body
trueimport asyncio
from truto_python_sdk import TrutoApi
truto_api = TrutoApi(token="<your_api_token>")
async def main():
result = await truto_api.integrated_accounts.run_post_install_actions("<id>")
print(result)
asyncio.run(main())curl -X POST 'https://api.truto.one/integrated-account/run-post-install-actions' \
-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/run-post-install-actions', {
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/run-post-install-actions"
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())