post_whats_app_message_media
async
¶
post_whats_app_message_media(
origination_phone_number_id: WhatsAppPhoneNumberId,
*,
config_overrides: Optional[AsyncSocialMessagingClientConfig] = None,
source_s3_presigned_url: Optional[S3PresignedUrl] = None,
source_s3_file: Optional[S3File] = None,
) -> PostWhatsAppMessageMediaOutput
Upload a media file to the WhatsApp service. Only the specified originationPhoneNumberId has the permissions to send the media file when using SendWhatsAppMessage. You must use either sourceS3File or sourceS3PresignedUrl for the source. If both or neither are specified then an InvalidParameterException is returned.
Parameters:
-
origination_phone_number_id(WhatsAppPhoneNumberId) –The ID of the phone number to associate with the WhatsApp media file. The phone number identifiers are formatted as
phone-number-id-01234567890123456789012345678901. Use GetLinkedWhatsAppBusinessAccount to find a phone number's id. -
source_s3_presigned_url(Optional[S3PresignedUrl], default:None) –The source presign url of the media file.
-
source_s3_file(Optional[S3File], default:None) –The source S3 url for the 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
2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 | |