Create or rotate the identity secret
/api/v1/webchat/channels/{channelId}/identity-verification/secretCreates the channel's identity secret, or replaces it if one exists.
The secret is returned only in this response. Store it in your server's secret manager. Never put it in a website, mobile app or source code.
Rotating takes effect immediately:
- every
userTokenanduserHashmade with the old secret stops working; - every active chat session ends, and the user continues as a guest until your page or app provides a new token.
Deploy the new secret to your servers at the same time.
Request
Authorization
Bearer Token
Provide your API token in the Authorization header. See Authentication to issue one.
Example:Authorization: Bearer ********************
channelIdstringrequiredExample:
Responses
201New secret created.
New secret created.
requestIdstring<uuid>requiredUnique ID for this request, useful when contacting support.
secretstringrequired64 hex characters. Shown only once. Keep it on your server.
400Invalid request, e.g. channelId is not a UUID.
Invalid request, e.g. channelId is not a UUID.
messagestringrequirederrorstringoptionalstatusCodeintegerrequired
401The API token is missing, invalid, expired or revoked.
The API token is missing, invalid, expired or revoked.
messagestringrequirederrorstringoptionalstatusCodeintegerrequired
404No web chat channel with this ID exists in your account.
No web chat channel with this ID exists in your account.
messagestringrequirederrorstringoptionalstatusCodeintegerrequired
429Rate limit exceeded (10 requests per second).
Rate limit exceeded (10 requests per second).
messagestringrequirederrorstringoptionalstatusCodeintegerrequired
502The chat service couldn't be reached. Retry shortly.
The chat service couldn't be reached. Retry shortly.
messagestringrequirederrorstringoptionalstatusCodeintegerrequired