Secrets

Mint Secret

Mint a secret for a token

post
/v1/secret/{secretId}/mint

Description

Returns a usable token minted from the secret (a refreshed OAuth access token, a freshly signed JWT, or a stored bearer token). This is the one endpoint where the credential leaves the server, for use when a proxy cannot serve the request (provider SDKs, non-HTTP, or targets not reachable from the platform). Owner-only. basic/plain and platform-managed secrets are not mintable - use the proxy instead.

Authorization

ChatBotKit API Secret * Required

HTTP Authorization Scheme: bearer

Path Parameters

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.secret.mint(

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