get_integration_credentials
Retrieve the stored third-party integration credentials for every business in your organization.
get_integration_credentials(context: dict) -> dictReturns the raw credentials of the third-party integrations installed on your businesses — API tokens, access tokens, and related identifiers — so your Python code can call those platforms' APIs directly when the built-in actions don't cover your use case.
The result covers every business in your organization, keyed by business slug. Businesses with no credential-exposing integrations are omitted.
Security. These are live production credentials. Only use them inside your action's code to call the third-party API — never log them, store them in conversation metadata, or include them in a bot response.
Parameters
| Name | Type | Description |
|---|---|---|
context | dict | The context object passed to your action |
Returns
dict — Keyed by business slug. Each value is a dict keyed by integration name, holding that integration's credentials:
{
"acme-corp": {
"shopify": {
"domain": "acme.myshopify.com",
"accessToken": "shpat_...",
},
"zendesk": {
"subdomain": "acme",
"apiKey": "...",
},
"recharge": {"apiToken": "..."},
"loop": {"apiToken": "..."},
},
"acme-corp-de": {
"shopify": {
"domain": "acme-de.myshopify.com",
"accessToken": "shpat_...",
},
},
}Supported integrations
| Integration | Fields | Notes |
|---|---|---|
shopify | domain, accessToken | Admin API access token for the shop at domain. |
zendesk | subdomain, apiKey | Use as a Bearer token: Authorization: Bearer {apiKey} against https://{subdomain}.zendesk.com. |
recharge | apiToken | Recharge Admin API token. |
loop | apiToken | Loop Subscriptions API token. |
Integrations that don't expose credentials (or aren't installed) simply don't appear in the result.
Example
Get the credentials for the current business
def execute_action(context):
slug = context["conversation"]["businessSlug"]
credentials = get_integration_credentials(context).get(slug, {})
shopify = credentials.get("shopify")
if shopify is None:
return {"error": "Shopify is not installed for this business."}
# Call the Shopify Admin API with shopify["domain"] and shopify["accessToken"]
...