MCPcopy Index your code
hub / github.com/simstudioai/sim / buildAuthHeaders

Function buildAuthHeaders

apps/sim/tools/whatsapp/utils.ts:15–23  ·  view source on GitHub ↗
(accessToken: string | undefined)

Source from the content-addressed store, hash-verified

13
14/** Build the shared Bearer auth headers for the WhatsApp Cloud API. */
15export function buildAuthHeaders(accessToken: string | undefined): Record<string, string> {
16 if (!accessToken) {
17 throw new Error('WhatsApp Access Token is required')
18 }
19 return {
20 Authorization: `Bearer ${accessToken.trim()}`,
21 'Content-Type': 'application/json',
22 }
23}
24
25export function isRecord(value: unknown): value is Record<string, unknown> {
26 return typeof value === 'object' && value !== null

Callers 8

send_reaction.tsFile · 0.90
mark_read.tsFile · 0.90
send_media.tsFile · 0.90
send_template.tsFile · 0.90
fetchTableSchemaFunction · 0.50
fetchTagDefinitionsFunction · 0.50
fetchWorkflowInputFieldsFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected