Python helpers

get_integration_credentials

Get the stored credentials of your connected platforms, so Python can call their full APIs directly.

get_integration_credentials(context: dict) -> dict

Returns the credentials of the platforms connected to your businesses, such as API tokens, access tokens and related identifiers. Your Python code can then call those platforms' APIs directly. For example, an action can read a business's Recharge token and call any Recharge endpoint, not only the ones a ready-made helper covers.

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.

These are live production credentials

Only use them inside your code to call the third-party API. Never log them, store them in conversation metadata, or include them in a bot response.


Parameters

NameTypeDescription
contextdictThe 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",
            "stores": [
                {"domain": "acme.myshopify.com"},
                {"domain": "acme-eu.myshopify.com"},
            ],
        },
        "zendesk": {
            "subdomain": "acme",
            "apiKey": "...",
        },
        "recharge": {"apiToken": "..."},
        "loop": {"apiToken": "..."},
        "kaching": {"apiToken": "..."},
        "prestaShop": {
            "storeUrl": "https://shop.example.com",
            "apiKey": "...",
        },
    },
    "acme-corp-de": {
        "shopify": {
            "domain": "acme-de.myshopify.com",
        },
    },
}

Integrations it returns

IntegrationFieldsNotes
shopifydomain, storesThe connected stores, without a token. Call Shopify with shopify_graphql. See multiple stores.
woocommercedomain, consumerKey, consumerSecret, categoryWhitelistWooCommerce REST API keys for the store at domain.
bigCommercestoreHash, token, storeUrlOverrideSend X-Auth-Token: {token} to https://api.bigcommerce.com/stores/{storeHash}.
magento2storeUrl, OAuth credentials, optional storeId, useAccessTokenAsBearerTokenMagento REST API access. See the action playbook.
prestaShopstoreUrl, apiKeyPrestaShop Webservice key for the store at storeUrl.
shoptetPremiumapiKeySend Shoptet-Private-API-Token: {apiKey} to https://api.myshoptet.com/api.
checkoutChamploginId, password, apiBaseUrlPass loginId and password as parameters to apiBaseUrl. Call it with proxy_request; see CheckoutChamp.
stripeapiKey, apiBaseUrlSend Authorization: Bearer {apiKey} to apiBaseUrl (https://api.stripe.com). Form-encode POST bodies. See Stripe.
rechargeapiTokenRecharge Admin API token.
loopapiTokenSend X-Loop-Token: {apiToken}. See the Loop helpers.
kachingapiTokenSend Authorization: Bearer {apiToken} to https://subscriptions.kachingappz.app/shop-api. See Kaching Subscriptions.
zendesksubdomain, apiKeyUse as a Bearer token: Authorization: Bearer {apiKey} against https://{subdomain}.zendesk.com.
freshdesksubdomain, apiKey, agentIdBasic auth with apiKey as the username and X as the password against https://{subdomain}.freshdesk.com/api/v2. The key belongs to the bot agent, an Administrator; agentId is its ID. Conversations from Freshdesk carry the ticket number in freshdesk:ticketId metadata.
intercomaccessTokenBearer token for https://api.intercom.io, from OAuth or the connection's API key.
reamazesubdomain, apiKey, agentEmailBasic auth with agentEmail:apiKey against https://{subdomain}.reamaze.io/api/v1.
richpanelapiKeySend x-richpanel-key: {apiKey} to https://api.richpanel.com/v1.
dixaapiKey, requesterId, emailIntegrationIdSend Authorization: {apiKey} to https://dev.dixa.io/v1.
hubspotapiKeyPrivate app token: Authorization: Bearer {apiKey} against https://api.hubapi.com.
klaviyoapiKey, mailingListId (a saved list ID, usually null)Send Authorization: Klaviyo-API-Key {apiKey} and a revision header to https://a.klaviyo.com/api. See the Klaviyo helpers and the Klaviyo guide.
brazeapiKey, baseUrlBearer token for your Braze REST endpoint at baseUrl.
judgemeapiToken, shopDomainPass api_token and shop_domain to https://judge.me/api/v1.
aftershipapiKeySend as-api-key: {apiKey} to https://api.aftership.com.
commslayerapiKey, accountIdBearer token for https://app.commslayer.com/api/integration/v1.
whopapiKey, accountIdSend Authorization: Bearer {apiKey} to https://api.whop.com/api/v1, for example GET /payments?account_id={accountId}&user_id=.... The key cannot send chat messages.
podiumaccessToken, expiresAt, scopesBearer token for https://api.podium.com/v4; refreshed automatically before retrieval.
notionconnections: array of connection IDs, workspace/account identity and accessTokenMultiple Notion workspaces and accounts. See the installation guide.

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. Channel credentials (email, Telegram, Meta, WhatsApp), OAuth refresh tokens and the App Store and Google Play review keys stay internal. Ask Copilot to run list_integrations to see which integrations a business has installed and which of them this helper returns.

Notion

Install through Settings -> Workspace -> 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.

CheckoutChamp

Create an API user in CheckoutChamp, whitelist Octocom's IP 74.242.171.127 for it, then connect it in Settings -> Workspace -> Integrations -> CheckoutChamp. The installation guide has the steps. Copilot can also use connect_checkout_champ, check_checkout_champ_connection, get_checkout_champ_connection and disconnect_checkout_champ.

The checkoutChamp entry contains loginId, password and apiBaseUrl. CheckoutChamp only accepts calls from whitelisted IPs, so send them with proxy_request or proxy_session, and check the response's result field: rejected calls still return HTTP 200 with "result": "ERROR". The password travels in the request URL, so never log request URLs or parameters, and avoid raise_for_status(): its error message includes the URL.

Stripe

Create a restricted key in Stripe under Developers -> API keys and paste it in Settings -> Workspace -> Integrations -> Stripe. The setup guide lists the base permissions and the extra ones for refunds or subscription changes. Copilot can also use connect_stripe, check_stripe_connection, get_stripe_connection and disconnect_stripe.

The stripe entry contains apiKey and apiBaseUrl. Stripe takes form-encoded bodies, so pass data= rather than json= on POST requests. A 403 response means the key lacks a permission; Stripe's error message names the one to add in its internal form (rak_charge_write is Charges: Write in the key editor).

Podium automations

Connect Podium from Settings -> Workspace -> Integrations -> Podium and select Continue to Podium, 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 mirrors the first store.

If you run several storefronts under one business, iterate stores and name each one to shopify_graphql:

shopify = (get_integration_credentials(context).get(slug) or {}).get("shopify") or {}

for store in shopify.get("stores") or []:
    result = shopify_graphql(context, QUERY, variables, api_version="2026-10", shop=store["domain"])
    # ...try each store until you find what you're looking for

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_graphql(context, ..., shop=shopify["domain"])
    ...

On this page