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 helper is available in Python actions, condition providers, recurring jobs, and other Python automations. It is the primary way to reach a connected platform from your Python code. 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": "..."},
"prestaShop": {
"storeUrl": "https://shop.example.com",
"apiKey": "...",
},
},
"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. |
podium | accessToken, expiresAt, scopes | Bearer token for https://api.podium.com/v4; refreshed automatically before retrieval. |
notion | connections: array of connection IDs, workspace/account identity and accessToken | Multiple Notion workspaces and accounts. See the installation guide. |
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. |
magento2 | storeUrl, OAuth credentials, optional storeId, useAccessTokenAsBearerToken | Magento REST API access. See the action playbook. |
prestaShop | storeUrl, apiKey | PrestaShop Webservice key for the store at storeUrl. |
magento2 exposes storeUrl, consumerKey, consumerSecret, accessToken, accessTokenSecret, optional storeId, and useAccessTokenAsBearerToken. Preserve the URL's path prefix and use the configured authentication mode. See the Magento action playbook for signed requests, order searches and workflow setup.
Integrations that don't expose credentials (or aren't installed) simply don't appear in the result.
Notion
Install through Settings -> Integrations -> Notion -> Install in Notion, then ask Copilot to set up a sync for your selected pages and schedule. Installation alone does not import knowledge. Multiple workspaces and authorizing accounts are supported.
The notion entry contains connections, an array of { id, workspaceId, workspaceName, ownerId, ownerName, accessToken }. Select a stable connection id explicitly and fetch credentials on each execution. Refresh/client secrets remain internal. See the Notion installation guide for setup, Python examples, reconnecting and disconnecting.
Podium automations
Connect Podium from Settings -> Integrations -> Podium -> Install, then
approve the requested access in Podium. Copilot can also start setup with
connect_podium and give you the consent link. Use get_podium_connection to
inspect the connection or disconnect_podium to remove it.
The podium entry contains accessToken, expiresAt (ISO 8601), and scopes.
Octocom refreshes expiring access tokens before returning credentials. Fetch
credentials when your automation runs rather than storing them for later use.
Refresh tokens and the app's client secret stay internal. If authorization
has been revoked, reconnect Podium. An unavailable connection is omitted from
the helper's result.
import requests
def execute_action(context):
credentials = get_integration_credentials(context)
podium = credentials.get("your-business-slug", {}).get("podium")
if not podium:
raise ValueError("Connect Podium in Settings -> Integrations first.")
response = requests.get(
"https://api.podium.com/v4/locations",
headers={"Authorization": f"Bearer {podium['accessToken']}"},
timeout=30,
)
response.raise_for_status()
return response.json()["data"]Use the same credential lookup inside a condition provider's
evaluate_conditions(context) function and return a dictionary such as
{"conditions": {"podiumConnected": True}, "data": {}}. See the
Podium API reference for operations, required
scopes, location identifiers, and pagination.
The connection requests broad operational access to contacts, messages, reviews, appointments, campaigns, feedback, products, templates, reporting, phones, email leads and data-feed events. Locations, organization details and users are read-only. Payments and administrative writes are excluded. Available operations also depend on the approving user's Podium permissions. The connection enables custom API automations; installing it does not start inbox synchronization.
Disconnect removes credentials stored in Octocom and cancels pending consent. To revoke the app's access in Podium as well, remove it in your Podium account.
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"]
...