send_whats_app_message
¶
send_whats_app_message(
origination_phone_number_id: WhatsAppPhoneNumberId,
message: WhatsAppMessageBlob,
meta_api_version: str,
*,
config_overrides: Optional[SocialMessagingClientConfig] = None,
) -> SendWhatsAppMessageOutput
Send a WhatsApp message. For examples of sending a message using the Amazon Web Services CLI, see Sending messages in the Amazon Web Services End User Messaging Social User Guide .
Parameters:
-
origination_phone_number_id(WhatsAppPhoneNumberId) –The ID of the phone number used to send the WhatsApp message. If you are sending a media file only the
originationPhoneNumberIdused to upload the file can be used. Phone number identifiers are formatted asphone-number-id-01234567890123456789012345678901. Use GetLinkedWhatsAppBusinessAccount to find a phone number's id. -
message(WhatsAppMessageBlob) –The message to send through WhatsApp. The length is in KB. The message field passes through a WhatsApp Message object, see Messages in the WhatsApp Business Platform Cloud API Reference.
-
meta_api_version(str) –The API version for the request formatted as
v{VersionNumber}. For a list of supported API versions and Amazon Web Services Regions, see Amazon Web Services End User Messaging Social API Service Endpoints in the Amazon Web Services General Reference.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
ValidationException–The request contains an invalid parameter value.
-
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
2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 | |