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

Function buildMessagesUrl

apps/sim/tools/whatsapp/utils.ts:7–12  ·  view source on GitHub ↗
(phoneNumberId: string | undefined)

Source from the content-addressed store, hash-verified

5
6/** Build the messages endpoint for a given business phone number ID. */
7export function buildMessagesUrl(phoneNumberId: string | undefined): string {
8 if (!phoneNumberId) {
9 throw new Error('WhatsApp Phone Number ID is required')
10 }
11 return `https://graph.facebook.com/${WHATSAPP_GRAPH_VERSION}/${phoneNumberId.trim()}/messages`
12}
13
14/** Build the shared Bearer auth headers for the WhatsApp Cloud API. */
15export function buildAuthHeaders(accessToken: string | undefined): Record<string, string> {

Callers 5

send_reaction.tsFile · 0.90
mark_read.tsFile · 0.90
send_media.tsFile · 0.90
send_template.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected