Contact Secrets
Proxy Contact Secret
Proxy a request with a contact's secret
Description
Performs an outbound HTTP request with a personal (per-contact) secret injected into the request headers at egress. The secret value never leaves the server. The upstream response is returned verbatim.
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 inject
Request Body * Required
Request Body Schema: application/json
methodstring
The HTTP method
urlstring
The destination URL
headersobject
The request headers (may reference the secret)
bodystring
The request body
import { ChatBotKit } from '@chatbotkit/sdk'
const cbk = new ChatBotKit({
secret: process.env.CHATBOTKIT_API_KEY!
})
const response = await cbk.contact.secret.proxy(
contactId, secretId,{)"method":"string","url":"string","headers":"object",}"body":"string"