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.
This is the primary way to reach a connected platform from an action. Rather than a wrapper per platform per operation, you get the credentials and call the API yourself, which means your action is limited only by what that platform's API allows.
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_...",
"stores": [
{"domain": "acme.myshopify.com", "accessToken": "shpat_..."},
{"domain": "acme-eu.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, stores | Admin API access token for the shop at domain. See multiple stores. |
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.
Multiple Shopify stores
A business can have more than one Shopify store connected. The stores list carries all of them, oldest first; the top-level domain / accessToken mirror the first store so single-store code keeps working unchanged.
If you run several storefronts under one business, iterate stores rather than assuming the top-level pair:
shopify = (get_integration_credentials(context).get(slug) or {}).get("shopify") or {}
for store in shopify.get("stores") or []:
domain, token = store["domain"], store["accessToken"]
# ...try each store until you find what you're looking forExample
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"]
...