get_whats_app_message_media
async
¶
get_whats_app_message_media(
media_id: WhatsAppMediaId,
origination_phone_number_id: WhatsAppPhoneNumberId,
*,
config_overrides: Optional[AsyncSocialMessagingClientConfig] = None,
metadata_only: Optional[bool] = None,
destination_s3_presigned_url: Optional[S3PresignedUrl] = None,
destination_s3_file: Optional[S3File] = None,
) -> GetWhatsAppMessageMediaOutput
Get a media file from the WhatsApp service. On successful completion the media file is retrieved from Meta and stored in the specified Amazon S3 bucket. Use either destinationS3File or destinationS3PresignedUrl for the destination. If both are used then an InvalidParameterException is returned.
Parameters:
-
media_id(WhatsAppMediaId) –The unique identifier for the media file.
-
origination_phone_number_id(WhatsAppPhoneNumberId) –The unique identifier of the originating phone number for the WhatsApp message media. The phone number identifiers are formatted as
phone-number-id-01234567890123456789012345678901. Use GetLinkedWhatsAppBusinessAccount to find a phone number's id. -
metadata_only(Optional[bool], default:None) –Set to
Trueto get only the metadata for the file. -
destination_s3_presigned_url(Optional[S3PresignedUrl], default:None) –The presign url of the media file.
-
destination_s3_file(Optional[S3File], default:None) –The
bucketNameandkeyof the S3 media file.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
ValidationException–The request contains an invalid parameter value.
-
AccessDeniedByMetaException–You do not have sufficient access to perform this action.
-
DependencyException–Thrown when performing an action because a dependency would be broken.
-
InternalServiceException–The request processing has failed because of an unknown error, exception, or failure.
-
InvalidParametersException–One or more parameters provided to the action are not valid.
-
ResourceNotFoundException–The resource was not found.
-
ThrottledRequestException–The request was denied due to request throttling.
-
UnknownServiceError–The service returned an error code this client does not model.