post_whats_app_message_media
¶
post_whats_app_message_media(
origination_phone_number_id: WhatsAppPhoneNumberId,
*,
config_overrides: Optional[SocialMessagingClientConfig] = 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/social_messaging.py
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 2344 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 | |