Contact Secrets

Mint Contact Secret

Mint a contact's secret for a token

post
/v1/contact/{contactId}/secret/{secretId}/mint

Description

Returns a usable token minted from a personal (per-contact) secret. The credential leaves the server, for use when a proxy cannot serve the request. Owner-only. Platform-managed and basic/plain secrets are not mintable.

Authorization

ChatBotKit API Secret * Required

HTTP Authorization Scheme: bearer

Path Parameters

contactIdstring* Required

The ID of the contact the secret belongs to

secretIdstring* Required

The ID of the secret to mint

import { ChatBotKit } from '@chatbotkit/sdk'

const cbk = new ChatBotKit({

secret: process.env.CHATBOTKIT_API_KEY!

})

const response = await cbk.contact.secret.mint(

contactId, secretId
)
{
"token":"string",
"expiresAt":"number"
}
The minted token