Skip to content

GetWhatsAppMessageTemplate

Source: src/AWS/SocialMessaging/GetWhatsAppMessageTemplate.ts

Runtime binding for social-messaging:GetWhatsAppMessageTemplate.

Retrieves a WhatsApp message template’s JSON definition from the bound account by its Meta template id.

The deploy-time half grants social-messaging:GetWhatsAppMessageTemplate on the bound WABA’s ARN and the runtime half injects the linked account id into every request. Provide the implementation with Effect.provide(AWS.SocialMessaging.GetWhatsAppMessageTemplateHttp).

// init — bind the operation to the linked WABA
const getTemplate = yield* AWS.SocialMessaging.GetWhatsAppMessageTemplate(account);
// runtime
const { template } = yield* getTemplate({
metaTemplateId: "1234567890",
});