Quick start: API only (your backend talks to Gauge)
No widget and no WebView: your backend provisions users, grants them Integrations and mints sign-in links. Every call uses a server API key (Authorization: Bearer pulse_k_…) with support scope.
export GAUGE=https://app.gauge.chat/backend
export KEY=pulse_k_test_... # a test key reaches the sandbox only
export APP=<your App id>1. Provision a user and grant Integrations
curl -sS -X PUT "$GAUGE/v1/support/customers/by-ref/u_1029" \
-H "Authorization: Bearer $KEY" -H 'content-type: application/json' \
-d "{\"email\":\"layla@example.com\",\"projectIds\":[\"$APP\"],\"integrationKeys\":{\"$APP\":[\"customer\"]}}"integrationKeys is authoritative for each App you name. On an App with several integrations an
empty list means the default integration only.
2. Mint a sign-in link onto one Integration
curl -sS -X POST "$GAUGE/v1/support/sessions" \
-H "Authorization: Bearer $KEY" -H 'content-type: application/json' \
-d "{\"projectId\":\"$APP\",\"externalRef\":\"u_1029\",\"integration\":\"customer\"}"
# → 201 {"url":"https://…","expiresAt":"…"}| Answer | Meaning |
|---|---|
201 | Redirect the browser (or WebView) to url. Single use, mint per open |
403 integration_not_granted | Grant the key in step 1 first |
404 unknown_integration | The App has no integration with that key |
3. Revoke
Send the user again without the key: "integrationKeys":{"<appId>":[]}. Their live chat on it ends
at their next message, and tokens minted before the change stop working.
Signed tokens from your backend
If your own frontend opens the widget, mint a token instead of a link; see integration-token.md.
Quick start: chat in your mobile app (WebView)
Your backend mints a one-time sign-in link for the signed-in user and the Integration. Your app opens it in a WebView, which lands in that integration's live chat. No secret ever ships in the app.
Quick starts by stack
Each page takes a signed-in user on your site to a verified Gauge chat in about 15 minutes, and wires the webhook back to your server. Pick your stack: