:doc:`EndUserMessagingSocial <../../socialmessaging>` / Client / send_whatsapp_message

*********************
send_whatsapp_message
*********************



.. py:method:: EndUserMessagingSocial.Client.send_whatsapp_message(**kwargs)

  

  Send a WhatsApp message. For examples of sending a message using the Amazon Web Services CLI, see `Sending messages <https://docs.aws.amazon.com/social-messaging/latest/userguide/send-message.html>`__ in the *Amazon Web Services End User Messaging Social User Guide* .

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/socialmessaging-2024-01-01/SendWhatsAppMessage>`_  


  **Request Syntax**
  ::

    response = client.send_whatsapp_message(
        originationPhoneNumberId='string',
        message=b'bytes',
        metaApiVersion='string'
    )
    
  :type originationPhoneNumberId: string
  :param originationPhoneNumberId: **[REQUIRED]** 

    The ID of the phone number used to send the WhatsApp message. If you are sending a media file only the ``originationPhoneNumberId`` used to upload the file can be used. Phone number identifiers are formatted as ``phone-number-id-01234567890123456789012345678901``. Use `GetLinkedWhatsAppBusinessAccount <https://docs.aws.amazon.com/social-messaging/latest/APIReference/API_GetLinkedWhatsAppBusinessAccount.html>`__ to find a phone number's id.

    

  
  :type message: bytes
  :param message: **[REQUIRED]** 

    The message to send through WhatsApp. The length is in KB. The message field passes through a WhatsApp Message object, see `Messages <https://developers.facebook.com/docs/whatsapp/cloud-api/reference/messages>`__ in the *WhatsApp Business Platform Cloud API Reference*.

    

  
  :type metaApiVersion: string
  :param metaApiVersion: **[REQUIRED]** 

    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 <https://docs.aws.amazon.com/general/latest/gr/end-user-messaging.html>`__ in the *Amazon Web Services General Reference*.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'messageId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **messageId** *(string) --* 

        The unique identifier of the message.

        
  
  **Exceptions**
  
  *   :py:class:`EndUserMessagingSocial.Client.exceptions.ValidationException`

  
  *   :py:class:`EndUserMessagingSocial.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`EndUserMessagingSocial.Client.exceptions.InvalidParametersException`

  
  *   :py:class:`EndUserMessagingSocial.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`EndUserMessagingSocial.Client.exceptions.ThrottledRequestException`

  
  *   :py:class:`EndUserMessagingSocial.Client.exceptions.InternalServiceException`

  
  *   :py:class:`EndUserMessagingSocial.Client.exceptions.DependencyException`

  