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. Disabled by default: unless the platform sets PLATFORM_CONTACT_SECRET_MINT_ENABLED=true every call is refused with a 403 - use the contact secret proxy instead. Owner-only, and refused with a 403 when a platform admin has switched into the account (parent, team and x-runas-* switches are allowed). Platform-managed and bearer/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({

token: process.env.CHATBOTKIT_API_TOKEN!

})

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

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