Connector proxy

Call a connected integration's action without the app ever holding the credential.

2 endpointsHTTP API referenceGuide: Integrations catalog

On this page
  1. Authentication
  2. Endpoints
  3. GET /connector-proxy/available
  4. POST /connector-proxy/:integration/:action

Base URL: your app's origin ($APP_ORIGIN): the dev site (https://dev-<slug>.apps.appbricx.com), the published host or a custom domain. Errors answer { ok: false, error: { code, message } } unless noted. The host decides the environment: the dev site reads and writes the dev database, the published host and custom domains production's.

Authentication

App key
A project key identifies the app. No user session is needed. Authorization: Bearer $APP_KEY

Endpoints

Connected integrations

GET/__appbricx/connector-proxy/available

The project's connected integrations (this environment or all) with their callable actions.

Auth
App key: Authorization: Bearer $APP_KEY

Response

Response
{
  "integrations": [
    {
      "id": "slack",
      "displayName": "Slack",
      "actions": [
        {
          "name": "send_channel_message",
          "displayName": "Send Message To A Channel"
        }
      ]
    }
  ]
}

Errors

StatusCodeWhen
401UNAUTHORIZEDMissing or invalid Authorization bearer.
curl
curl "$APP_ORIGIN/__appbricx/connector-proxy/available" \
  -H "Authorization: Bearer $APP_KEY"
fetch
const res = await fetch(`${APP_ORIGIN}/__appbricx/connector-proxy/available`, {
  headers: {
    Authorization: `Bearer ${APP_KEY}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/runtime/data/owner_http.go:54

Run an integration action

POST/__appbricx/connector-proxy/:integration/:action

Run one action of a connected integration server-side, from the browser or another backend. The app never holds the credential; every call is audited. Prefer a server action or a workflow, where you check the input first.

Auth
App key: Authorization: Bearer $APP_KEY

Path parameters

NameTypeDescription
:integrationrequiredstringThe integration id, e.g. slack.
:actionrequiredstringThe action name (see its integration page).

Body

NameTypeDescription
propsoptionalobjectThe action's input.

Response

A failed action: { success: false, data: null, error: { code: "EXECUTION_FAILED", message } }.

Response
{
  "success": true,
  "data": {
    "ok": true,
    "ts": "1697100000.000100"
  },
  "meta": {
    "integrationId": "slack",
    "actionName": "send_channel_message",
    "durationMs": 412
  }
}

Errors

StatusCodeWhen
401UNAUTHORIZEDMissing or invalid Authorization bearer.
403TOOL_NOT_ALLOWEDThe key's allowed tools exclude this action.
429RATE_LIMITEDToo many requests.
403INTEGRATION_NOT_CONNECTEDNo connection.
413PAYLOAD_TOO_LARGEOver 1 MB.
500EXECUTION_ERRORThe runner threw.
curl
curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/slack/send_channel_message" \
  -H "Authorization: Bearer $APP_KEY" \
  -H "content-type: application/json" \
  -d '{"props":{"channel":"C0123456","text":"Deploy finished"}}'
fetch
const res = await fetch(`${APP_ORIGIN}/__appbricx/connector-proxy/slack/send_channel_message`, {
  method: "POST",
  headers: {
    Authorization: `Bearer ${APP_KEY}`,
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "props": {
      "channel": "C0123456",
      "text": "Deploy finished"
    }
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/runtime/data/owner_http.go:57