Skip to content
AI Support / Dev Center

10 results · Esc to close

Documentation/Authentication

GETTING STARTED

Authentication

One credential in the backend. One temporary session in the widget.

Three credentials, three roles

Each credential has a purpose. Never distribute platform signing keys.

CredentialUsoLocal
sik_Issue widget sessionsPrivate backend environment
tsk_Configuration of the tenant itselfSelf-service dashboard
MCP CredentialAuthenticate calls to your connectorBackend → mcpServers[].accessToken

Issuance in backend

The backend can send up to eight servers in mcpServers. Omit the list for context-only chat.

cURL
# Somente no backend. Use variáveis do ambiente privado.
curl --fail-with-body \
  https://support-ai.pontes.uk/api/widget/sessions \
  -H "Authorization: Bearer $SUPPORT_INTEGRATION_CREDENTIAL" \
  -H "Content-Type: application/json" \
  -d '{"userId":"usr_exemplo","userEmail":"","userRoles":["member"],"plan":"standard"}' 

userId: 1–200 characters. Up to 30 roles of 1–80 characters. plan: 1–80 characters. userEmail: up to 254 characters.

15-minute session

The issuer returns tenantKey, jwt, and expiresIn: 900. Check the expected tenant before returning to the browser. The reference adapter limits response, timeout, and redirects.

JSON
{ "jwt": "<JWT>", "tenantKey": "ten_seu_projeto", "expiresIn": 900 }

Identity, renewal, and revocation

Preserve a stable userId per person and authorized link. Email, role, device, and timestamp are not good identity keys. All conversation operations require the same tenant and owner.

After 401, the SDK calls onTokenRefresh and retries once. Destroy the instance before changing person, organization, or role. Local logout does not immediately revoke an already copied JWT: it can last up to 15 minutes.

Replacing or revoking sik_ invalidates sessions tied to the previous credential on the next call. Coordinate rotation. Legacy signatures with shared secret are not accepted.

CONTINUE HEREWidget SDK