Skip to content

CreateWhatsAppMessageTemplateMedia

Source: src/AWS/SocialMessaging/CreateWhatsAppMessageTemplateMedia.ts

Runtime binding for social-messaging:CreateWhatsAppMessageTemplateMedia.

Uploads media (from S3) for use in a WhatsApp message template header and returns the Meta header handle to reference from the template definition.

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

// init — bind the operation to the linked WABA
const uploadTemplateMedia = yield* AWS.SocialMessaging.CreateWhatsAppMessageTemplateMedia(account);
// runtime
const { metaHeaderHandle } = yield* uploadTemplateMedia({
sourceS3File: { bucketName: "my-assets", key: "header.png" },
});