PostWhatsAppMessageMedia
Source:
src/AWS/SocialMessaging/PostWhatsAppMessageMedia.ts
Runtime binding for social-messaging:PostWhatsAppMessageMedia.
Uploads a media file to WhatsApp (from an S3 object or presigned URL) so
it can be referenced by mediaId in outbound messages sent from the
given phone number.
The caller addresses one of the bound account’s phone numbers per
request; phone-number ARNs are provisioned by Meta under the WABA, so
the deploy-time half grants social-messaging:PostWhatsAppMessageMedia on *.
Provide the implementation with
Effect.provide(AWS.SocialMessaging.PostWhatsAppMessageMediaHttp).
Managing Message Media
Section titled “Managing Message Media”// init — bind the operation to the linked WABAconst postMedia = yield* AWS.SocialMessaging.PostWhatsAppMessageMedia(account);
// runtimeconst { mediaId } = yield* postMedia({ originationPhoneNumberId: "phone-number-id-0123456789abcdef", sourceS3File: { bucketName: "my-assets", key: "welcome.png" },});