Skip to main content
POST
Authenticate a widget user
Call this endpoint from your backend after verifying the customer’s identity. Saved http_action_overrides are available to authenticated widget sessions; supplying the same email through non-verified visitor data does not grant access to them. Send expires_in_seconds (120 to 86,400) for a token that stops working after that many seconds; omit it for a token that never expires. The lifetime applies only to the returned token, not to http_action_overrides. Renew it from the widget with user.refreshToken, and sign a visitor out with Revoke contact. See Short-lived tokens and renewal. mcp_access.credentials saves tokens your backend already holds for the user, so personal connections work without Connect. They are stored for the contact and never included in the returned token. See Skip Connect.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
email
string<email>
required
Pattern: ^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
mcp_access
object
name
string
avatar_url
string | null
phone
string
language
enum<string>
Available options:
en,
fr,
de,
nl,
pl,
pt,
es,
it,
ru,
ja,
ko,
zh,
ar,
tr,
sv,
da,
no,
fi,
el,
cs,
hu,
th,
vi,
id,
he,
hi,
uk,
ro,
bg,
hr,
sk,
sl,
sr,
et,
lv,
lt,
is,
ga,
ms,
tl,
fa,
bn,
ta,
te,
ur,
sw,
zu,
af,
sq,
hy,
az,
eu,
be,
bs,
ca,
cy,
ku,
ckb,
kmr
customData
object
chat_context
string
http_action_overrides
object
expires_in_seconds
integer

Lifetime of the returned widget token, in seconds (120 to 86400). Omit it for a token that never expires. It applies only to this token, not to http_action_overrides. Renew before expiry with the widget user.refreshToken option.

Required range: 120 <= x <= 86400

Response

Default Response

token
string
required

The JWT token to use for further requests

contact
object
required