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.
Source code in docs_src/capo_socialmessaging/_services/async_social_messaging.py
2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 | |