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 or a freshly signed JWT). 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, and refused with a 403 when a platform admin has switched into the account (parent, team and x-runas-* switches are allowed). bearer/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({

token: process.env.CHATBOTKIT_API_TOKEN!

})

const response = await cbk.secret.mint(

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