Connector proxy
Call a connected integration's action without the app ever holding the credential.
On this page
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
{
"integrations": [
{
"id": "slack",
"displayName": "Slack",
"actions": [
{
"name": "send_channel_message",
"displayName": "Send Message To A Channel"
}
]
}
]
}Errors
| Status | Code | When |
|---|---|---|
| 401 | UNAUTHORIZED | Missing or invalid Authorization bearer. |
curl "$APP_ORIGIN/__appbricx/connector-proxy/available" \
-H "Authorization: Bearer $APP_KEY"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
| Name | Type | Description |
|---|---|---|
:integrationrequired | string | The integration id, e.g. slack. |
:actionrequired | string | The action name (see its integration page). |
Body
| Name | Type | Description |
|---|---|---|
propsoptional | object | The action's input. |
Response
A failed action: { success: false, data: null, error: { code: "EXECUTION_FAILED", message } }.
{
"success": true,
"data": {
"ok": true,
"ts": "1697100000.000100"
},
"meta": {
"integrationId": "slack",
"actionName": "send_channel_message",
"durationMs": 412
}
}Errors
| Status | Code | When |
|---|---|---|
| 401 | UNAUTHORIZED | Missing or invalid Authorization bearer. |
| 403 | TOOL_NOT_ALLOWED | The key's allowed tools exclude this action. |
| 429 | RATE_LIMITED | Too many requests. |
| 403 | INTEGRATION_NOT_CONNECTED | No connection. |
| 413 | PAYLOAD_TOO_LARGE | Over 1 MB. |
| 500 | EXECUTION_ERROR | The runner threw. |
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"}}'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