EndUserMessagingSocial / Client / create_whatsapp_message_template_media
create_whatsapp_message_template_media¶
- EndUserMessagingSocial.Client.create_whatsapp_message_template_media(**kwargs)¶
Uploads media for use in a WhatsApp message template.
See also: AWS API Documentation
Request Syntax
response = client.create_whatsapp_message_template_media( id='string', sourceS3File={ 'bucketName': 'string', 'key': 'string' } )
- Parameters:
id (string) –
[REQUIRED]
The ID of the WhatsApp Business Account associated with this media upload.
sourceS3File (dict) –
Contains information for the S3 bucket that contains media files.
bucketName (string) – [REQUIRED]
The bucket name.
key (string) – [REQUIRED]
The S3 key prefix that defines the storage location of your media files. The prefix works like a folder path in S3, and is combined with the WhatsApp mediaId to create the final file path.
For example, if a media file’s WhatsApp mediaId is
123.ogg, and the key isaudio/example.ogg, the final file path isaudio/example.ogg123.ogg.For the same mediaId, a key of
audio/results in the file pathaudio/123.ogg.
- Return type:
dict
- Returns:
Response Syntax
{ 'metaHeaderHandle': 'string' }
Response Structure
(dict) –
metaHeaderHandle (string) –
The handle assigned to the uploaded media by Meta, used to reference the media in templates.
Exceptions
EndUserMessagingSocial.Client.exceptions.ValidationExceptionEndUserMessagingSocial.Client.exceptions.AccessDeniedExceptionEndUserMessagingSocial.Client.exceptions.ResourceNotFoundExceptionEndUserMessagingSocial.Client.exceptions.InvalidParametersExceptionEndUserMessagingSocial.Client.exceptions.ThrottledRequestExceptionEndUserMessagingSocial.Client.exceptions.InternalServiceExceptionEndUserMessagingSocial.Client.exceptions.DependencyException