Skip to content

CreateWhatsAppMessageTemplateFromLibrary

Source: src/AWS/SocialMessaging/CreateWhatsAppMessageTemplateFromLibrary.ts

Runtime binding for social-messaging:CreateWhatsAppMessageTemplateFromLibrary.

Creates a WhatsApp message template on the bound account from one of the pre-approved templates in Meta’s template library.

The deploy-time half grants social-messaging:CreateWhatsAppMessageTemplateFromLibrary 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.CreateWhatsAppMessageTemplateFromLibraryHttp).

// init — bind the operation to the linked WABA
const createFromLibrary = yield* AWS.SocialMessaging.CreateWhatsAppMessageTemplateFromLibrary(account);
// runtime
const { metaTemplateId } = yield* createFromLibrary({
metaLibraryTemplate: {
templateName: "order_shipped",
libraryTemplateName: "shipment_confirmation",
templateCategory: "UTILITY",
templateLanguage: "en_US",
},
});