send_whats_app_message
async
¶
send_whats_app_message(
origination_phone_number_id: WhatsAppPhoneNumberId,
message: WhatsAppMessageBlob,
meta_api_version: str,
*,
config_overrides: Optional[AsyncSocialMessagingClientConfig] = 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/async_social_messaging.py
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 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 | |