EndUserMessagingSocial ********************** Client ====== class EndUserMessagingSocial.Client A low-level client representing AWS End User Messaging Social *Amazon Web Services End User Messaging Social*, also referred to as Social messaging, is a messaging service that enables application developers to incorporate WhatsApp into their existing workflows. The *Amazon Web Services End User Messaging Social API* provides information about the *Amazon Web Services End User Messaging Social API* resources, including supported HTTP methods, parameters, and schemas. The *Amazon Web Services End User Messaging Social API* provides programmatic access to options that are unique to the WhatsApp Business Platform. If you're new to the *Amazon Web Services End User Messaging Social API*, it's also helpful to review What is Amazon Web Services End User Messaging Social in the *Amazon Web Services End User Messaging Social User Guide*. The *Amazon Web Services End User Messaging Social User Guide* provides tutorials, code samples, and procedures that demonstrate how to use *Amazon Web Services End User Messaging Social API* features programmatically and how to integrate functionality into applications. The guide also provides key information, such as integration with other Amazon Web Services services, and the quotas that apply to use of the service. **Regional availability** The *Amazon Web Services End User Messaging Social API* is available across several Amazon Web Services Regions and it provides a dedicated endpoint for each of these Regions. For a list of all the Regions and endpoints where the API is currently available, see Amazon Web Services Service Endpoints and Amazon Web Services End User Messaging endpoints and quotas in the Amazon Web Services General Reference. To learn more about Amazon Web Services Regions, see Managing Amazon Web Services Regions in the Amazon Web Services General Reference. In each Region, Amazon Web Services maintains multiple Availability Zones. These Availability Zones are physically isolated from each other, but are united by private, low-latency, high-throughput, and highly redundant network connections. These Availability Zones enable us to provide very high levels of availability and redundancy, while also minimizing latency. To learn more about the number of Availability Zones that are available in each Region, see Amazon Web Services Global Infrastructure. import boto3 client = boto3.client('socialmessaging') These are the available methods: * associate_whatsapp_business_account * can_paginate * close * create_whatsapp_message_template * create_whatsapp_message_template_from_library * create_whatsapp_message_template_media * delete_whatsapp_message_media * delete_whatsapp_message_template * disassociate_whatsapp_business_account * get_linked_whatsapp_business_account * get_linked_whatsapp_business_account_phone_number * get_paginator * get_waiter * get_whatsapp_message_media * get_whatsapp_message_template * list_linked_whatsapp_business_accounts * list_tags_for_resource * list_whatsapp_message_templates * list_whatsapp_template_library * post_whatsapp_message_media * put_whatsapp_business_account_event_destinations * send_whatsapp_message * tag_resource * untag_resource * update_whatsapp_message_template Paginators ========== Paginators are available on a client instance via the "get_paginator" method. For more detailed instructions and examples on the usage of paginators, see the paginators user guide. The available paginators are: * ListLinkedWhatsAppBusinessAccounts * ListWhatsAppMessageTemplates * ListWhatsAppTemplateLibrary EndUserMessagingSocial / Paginator / ListWhatsAppMessageTemplates ListWhatsAppMessageTemplates **************************** class EndUserMessagingSocial.Paginator.ListWhatsAppMessageTemplates paginator = client.get_paginator('list_whatsapp_message_templates') paginate(**kwargs) Creates an iterator that will paginate through responses from " EndUserMessagingSocial.Client.list_whatsapp_message_templates() ". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( id='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **id** (*string*) -- **[REQUIRED]** The ID of the WhatsApp Business Account to list templates for. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'templates': [ { 'templateName': 'string', 'metaTemplateId': 'string', 'templateStatus': 'string', 'templateQualityScore': 'string', 'templateLanguage': 'string', 'templateCategory': 'string' }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **templates** *(list) --* A list of template summaries. * *(dict) --* Provides a summary of a WhatsApp message template's key attributes. * **templateName** *(string) --* The name of the template. * **metaTemplateId** *(string) --* The numeric ID assigned to the template by Meta. * **templateStatus** *(string) --* The current status of the template (for example, APPROVED, PENDING, or REJECTED). * **templateQualityScore** *(string) --* The quality score assigned to the template by Meta. * **templateLanguage** *(string) --* The language code of the template (for example, en_US). * **templateCategory** *(string) --* The category of the template (for example, UTILITY or MARKETING). * **NextToken** *(string) --* A token to resume pagination. EndUserMessagingSocial / Paginator / ListWhatsAppTemplateLibrary ListWhatsAppTemplateLibrary *************************** class EndUserMessagingSocial.Paginator.ListWhatsAppTemplateLibrary paginator = client.get_paginator('list_whatsapp_template_library') paginate(**kwargs) Creates an iterator that will paginate through responses from " EndUserMessagingSocial.Client.list_whatsapp_template_library()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( id='string', filters={ 'string': 'string' }, PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **id** (*string*) -- **[REQUIRED]** The ID of the WhatsApp Business Account to list library templates for. * **filters** (*dict*) -- Map of filters to apply (searchKey, topic, usecase, industry, language). * *(string) --* * *(string) --* * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'metaLibraryTemplates': [ { 'templateName': 'string', 'templateLanguage': 'string', 'templateCategory': 'string', 'templateTopic': 'string', 'templateUseCase': 'string', 'templateIndustry': [ 'string', ], 'templateHeader': 'string', 'templateBody': 'string', 'templateButtons': [ { 'type': 'string', 'text': 'string', 'phoneNumber': 'string', 'url': 'string', 'otpType': 'string', 'zeroTapTermsAccepted': True|False, 'supportedApps': [ { 'string': 'string' }, ] }, ], 'templateId': 'string' }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **metaLibraryTemplates** *(list) --* A list of templates from Meta's library. * *(dict) --* Defines the complete structure and content of a template in Meta's library. * **templateName** *(string) --* The name of the template. * **templateLanguage** *(string) --* The language code for the template (for example, en_US). * **templateCategory** *(string) --* The category of the template (for example, UTILITY or MARKETING). * **templateTopic** *(string) --* The topic or subject matter of the template. * **templateUseCase** *(string) --* The intended use case for the template. * **templateIndustry** *(list) --* The industries the template is designed for. * *(string) --* * **templateHeader** *(string) --* The header text of the template. * **templateBody** *(string) --* The body text of the template. * **templateButtons** *(list) --* The buttons included in the template. * *(dict) --* Defines a button in a template from Meta's library. * **type** *(string) --* The type of button (for example, QUICK_REPLY, CALL, or URL). * **text** *(string) --* The text displayed on the button (maximum 40 characters). * **phoneNumber** *(string) --* The phone number in E.164 format for CALL-type buttons. * **url** *(string) --* The URL for URL-type buttons. * **otpType** *(string) --* The type of one-time password for OTP buttons. * **zeroTapTermsAccepted** *(boolean) --* When true, indicates acceptance of zero-tap terms for the button. * **supportedApps** *(list) --* List of supported applications for this button type. * *(dict) --* * *(string) --* * *(string) --* * **templateId** *(string) --* The ID of the template in Meta's library. * **NextToken** *(string) --* A token to resume pagination. EndUserMessagingSocial / Paginator / ListLinkedWhatsAppBusinessAccounts ListLinkedWhatsAppBusinessAccounts ********************************** class EndUserMessagingSocial.Paginator.ListLinkedWhatsAppBusinessAccounts paginator = client.get_paginator('list_linked_whatsapp_business_accounts') paginate(**kwargs) Creates an iterator that will paginate through responses from " EndUserMessagingSocial.Client.list_linked_whatsapp_business_acc ounts()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max- items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'linkedAccounts': [ { 'arn': 'string', 'id': 'string', 'wabaId': 'string', 'registrationStatus': 'COMPLETE'|'INCOMPLETE', 'linkDate': datetime(2015, 1, 1), 'wabaName': 'string', 'eventDestinations': [ { 'eventDestinationArn': 'string', 'roleArn': 'string' }, ] }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **linkedAccounts** *(list) --* A list of WhatsApp Business Accounts linked to your Amazon Web Services account. * *(dict) --* The details of a linked WhatsApp Business Account. * **arn** *(string) --* The ARN of the linked WhatsApp Business Account. * **id** *(string) --* The ID of the linked WhatsApp Business Account, formatted as "waba-01234567890123456789012345678901". * **wabaId** *(string) --* The WhatsApp Business Account ID provided by Meta. * **registrationStatus** *(string) --* The registration status of the linked WhatsApp Business Account. * **linkDate** *(datetime) --* The date the WhatsApp Business Account was linked. * **wabaName** *(string) --* The name of the linked WhatsApp Business Account. * **eventDestinations** *(list) --* The event destinations for the linked WhatsApp Business Account. * *(dict) --* Contains information on the event destination. * **eventDestinationArn** *(string) --* The ARN of the event destination. * **roleArn** *(string) --* The Amazon Resource Name (ARN) of an Identity and Access Management role that is able to import phone numbers and write events. * **NextToken** *(string) --* A token to resume pagination. EndUserMessagingSocial / Client / get_paginator get_paginator ************* EndUserMessagingSocial.Client.get_paginator(operation_name) Create a paginator for an operation. Parameters: **operation_name** (*string*) -- The operation name. This is the same name as the method name on the client. For example, if the method name is "create_foo", and you'd normally invoke the operation as "client.create_foo(**kwargs)", if the "create_foo" operation can be paginated, you can use the call "client.get_paginator("create_foo")". Raises: **OperationNotPageableError** -- Raised if the operation is not pageable. You can use the "client.can_paginate" method to check if an operation is pageable. Return type: "botocore.paginate.Paginator" Returns: A paginator object. EndUserMessagingSocial / Client / create_whatsapp_message_template_media create_whatsapp_message_template_media ************************************** EndUserMessagingSocial.Client.create_whatsapp_message_template_media(**kwargs) Uploads media for use in a WhatsApp message template. See also: AWS API Documentation **Request Syntax** response = client.create_whatsapp_message_template_media( id='string', sourceS3File={ 'bucketName': 'string', 'key': 'string' } ) Parameters: * **id** (*string*) -- **[REQUIRED]** The ID of the WhatsApp Business Account associated with this media upload. * **sourceS3File** (*dict*) -- Contains information for the S3 bucket that contains media files. * **bucketName** *(string) --* **[REQUIRED]** The bucket name. * **key** *(string) --* **[REQUIRED]** The object key of the media file. Return type: dict Returns: **Response Syntax** { 'metaHeaderHandle': 'string' } **Response Structure** * *(dict) --* * **metaHeaderHandle** *(string) --* The handle assigned to the uploaded media by Meta, used to reference the media in templates. **Exceptions** * "EndUserMessagingSocial.Client.exceptions.ValidationException" * "EndUserMessagingSocial.Client.exceptions.AccessDeniedException" * "EndUserMessagingSocial.Client.exceptions.ResourceNotFoundExcept ion" * "EndUserMessagingSocial.Client.exceptions.InvalidParametersExcep tion" * "EndUserMessagingSocial.Client.exceptions.ThrottledRequestExcept ion" * "EndUserMessagingSocial.Client.exceptions.InternalServiceExcepti on" * "EndUserMessagingSocial.Client.exceptions.DependencyException" EndUserMessagingSocial / Client / can_paginate can_paginate ************ EndUserMessagingSocial.Client.can_paginate(operation_name) Check if an operation can be paginated. Parameters: **operation_name** (*string*) -- The operation name. This is the same name as the method name on the client. For example, if the method name is "create_foo", and you'd normally invoke the operation as "client.create_foo(**kwargs)", if the "create_foo" operation can be paginated, you can use the call "client.get_paginator("create_foo")". Returns: "True" if the operation can be paginated, "False" otherwise. EndUserMessagingSocial / Client / put_whatsapp_business_account_event_destinations put_whatsapp_business_account_event_destinations ************************************************ EndUserMessagingSocial.Client.put_whatsapp_business_account_event_destinations(**kwargs) Add an event destination to log event data from WhatsApp for a WhatsApp Business Account (WABA). A WABA can only have one event destination at a time. All resources associated with the WABA use the same event destination. See also: AWS API Documentation **Request Syntax** response = client.put_whatsapp_business_account_event_destinations( id='string', eventDestinations=[ { 'eventDestinationArn': 'string', 'roleArn': 'string' }, ] ) Parameters: * **id** (*string*) -- **[REQUIRED]** The unique identifier of your WhatsApp Business Account. WABA identifiers are formatted as "waba-01234567890123456789012345678901". Use ListLinkedWhatsAppBusinessAccounts to list all WABAs and their details. * **eventDestinations** (*list*) -- **[REQUIRED]** An array of "WhatsAppBusinessAccountEventDestination" event destinations. * *(dict) --* Contains information on the event destination. * **eventDestinationArn** *(string) --* **[REQUIRED]** The ARN of the event destination. * **roleArn** *(string) --* The Amazon Resource Name (ARN) of an Identity and Access Management role that is able to import phone numbers and write events. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "EndUserMessagingSocial.Client.exceptions.ValidationException" * "EndUserMessagingSocial.Client.exceptions.AccessDeniedException" * "EndUserMessagingSocial.Client.exceptions.InvalidParametersExcep tion" * "EndUserMessagingSocial.Client.exceptions.ThrottledRequestExcept ion" * "EndUserMessagingSocial.Client.exceptions.InternalServiceExcepti on" EndUserMessagingSocial / Client / list_tags_for_resource list_tags_for_resource ********************** EndUserMessagingSocial.Client.list_tags_for_resource(**kwargs) List all tags associated with a resource, such as a phone number or WABA. See also: AWS API Documentation **Request Syntax** response = client.list_tags_for_resource( resourceArn='string' ) Parameters: **resourceArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the resource to retrieve the tags from. Return type: dict Returns: **Response Syntax** { 'statusCode': 123, 'tags': [ { 'key': 'string', 'value': 'string' }, ] } **Response Structure** * *(dict) --* * **statusCode** *(integer) --* The status code of the response. * **tags** *(list) --* The tags for the resource. * *(dict) --* The tag for a resource. * **key** *(string) --* The tag key. * **value** *(string) --* The tag value. **Exceptions** * "EndUserMessagingSocial.Client.exceptions.ValidationException" * "EndUserMessagingSocial.Client.exceptions.AccessDeniedException" * "EndUserMessagingSocial.Client.exceptions.InvalidParametersExcep tion" * "EndUserMessagingSocial.Client.exceptions.ThrottledRequestExcept ion" * "EndUserMessagingSocial.Client.exceptions.InternalServiceExcepti on" EndUserMessagingSocial / Client / list_whatsapp_message_templates list_whatsapp_message_templates ******************************* EndUserMessagingSocial.Client.list_whatsapp_message_templates(**kwargs) Lists WhatsApp message templates for a specific WhatsApp Business Account. See also: AWS API Documentation **Request Syntax** response = client.list_whatsapp_message_templates( id='string', nextToken='string', maxResults=123 ) Parameters: * **id** (*string*) -- **[REQUIRED]** The ID of the WhatsApp Business Account to list templates for. * **nextToken** (*string*) -- The token for the next page of results. * **maxResults** (*integer*) -- The maximum number of results to return per page (1-100). Return type: dict Returns: **Response Syntax** { 'templates': [ { 'templateName': 'string', 'metaTemplateId': 'string', 'templateStatus': 'string', 'templateQualityScore': 'string', 'templateLanguage': 'string', 'templateCategory': 'string' }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **templates** *(list) --* A list of template summaries. * *(dict) --* Provides a summary of a WhatsApp message template's key attributes. * **templateName** *(string) --* The name of the template. * **metaTemplateId** *(string) --* The numeric ID assigned to the template by Meta. * **templateStatus** *(string) --* The current status of the template (for example, APPROVED, PENDING, or REJECTED). * **templateQualityScore** *(string) --* The quality score assigned to the template by Meta. * **templateLanguage** *(string) --* The language code of the template (for example, en_US). * **templateCategory** *(string) --* The category of the template (for example, UTILITY or MARKETING). * **nextToken** *(string) --* The token to retrieve the next page of results, if any. **Exceptions** * "EndUserMessagingSocial.Client.exceptions.ValidationException" * "EndUserMessagingSocial.Client.exceptions.AccessDeniedException" * "EndUserMessagingSocial.Client.exceptions.ResourceNotFoundExcept ion" * "EndUserMessagingSocial.Client.exceptions.InvalidParametersExcep tion" * "EndUserMessagingSocial.Client.exceptions.ThrottledRequestExcept ion" * "EndUserMessagingSocial.Client.exceptions.InternalServiceExcepti on" * "EndUserMessagingSocial.Client.exceptions.DependencyException" EndUserMessagingSocial / Client / post_whatsapp_message_media post_whatsapp_message_media *************************** EndUserMessagingSocial.Client.post_whatsapp_message_media(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.post_whatsapp_message_media( originationPhoneNumberId='string', sourceS3PresignedUrl={ 'url': 'string', 'headers': { 'string': 'string' } }, sourceS3File={ 'bucketName': 'string', 'key': 'string' } ) Parameters: * **originationPhoneNumberId** (*string*) -- **[REQUIRED]** 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. * **sourceS3PresignedUrl** (*dict*) -- The source presign url of the media file. * **url** *(string) --* **[REQUIRED]** The presign url to the object. * **headers** *(dict) --* **[REQUIRED]** A map of headers and their values. You must specify the "Content-Type" header when using "PostWhatsAppMessageMedia". For a list of common headers, see Common Request Headers in the *Amazon S3 API Reference* * *(string) --* * *(string) --* * **sourceS3File** (*dict*) -- The source S3 url for the media file. * **bucketName** *(string) --* **[REQUIRED]** The bucket name. * **key** *(string) --* **[REQUIRED]** The object key of the media file. Return type: dict Returns: **Response Syntax** { 'mediaId': 'string' } **Response Structure** * *(dict) --* * **mediaId** *(string) --* The unique identifier of the posted WhatsApp message. **Exceptions** * "EndUserMessagingSocial.Client.exceptions.ValidationException" * "EndUserMessagingSocial.Client.exceptions.AccessDeniedException" * "EndUserMessagingSocial.Client.exceptions.ResourceNotFoundExcept ion" * "EndUserMessagingSocial.Client.exceptions.InvalidParametersExcep tion" * "EndUserMessagingSocial.Client.exceptions.ThrottledRequestExcept ion" * "EndUserMessagingSocial.Client.exceptions.AccessDeniedByMetaExce ption" * "EndUserMessagingSocial.Client.exceptions.InternalServiceExcepti on" * "EndUserMessagingSocial.Client.exceptions.DependencyException" EndUserMessagingSocial / Client / untag_resource untag_resource ************** EndUserMessagingSocial.Client.untag_resource(**kwargs) Removes the specified tags from a resource. See also: AWS API Documentation **Request Syntax** response = client.untag_resource( resourceArn='string', tagKeys=[ 'string', ] ) Parameters: * **resourceArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the resource to remove tags from. * **tagKeys** (*list*) -- **[REQUIRED]** The keys of the tags to remove from the resource. * *(string) --* Return type: dict Returns: **Response Syntax** { 'statusCode': 123 } **Response Structure** * *(dict) --* * **statusCode** *(integer) --* The status code of the untag resource operation. **Exceptions** * "EndUserMessagingSocial.Client.exceptions.ValidationException" * "EndUserMessagingSocial.Client.exceptions.AccessDeniedException" * "EndUserMessagingSocial.Client.exceptions.InvalidParametersExcep tion" * "EndUserMessagingSocial.Client.exceptions.ThrottledRequestExcept ion" * "EndUserMessagingSocial.Client.exceptions.InternalServiceExcepti on" EndUserMessagingSocial / Client / delete_whatsapp_message_media delete_whatsapp_message_media ***************************** EndUserMessagingSocial.Client.delete_whatsapp_message_media(**kwargs) Delete a media object from the WhatsApp service. If the object is still in an Amazon S3 bucket you should delete it from there too. See also: AWS API Documentation **Request Syntax** response = client.delete_whatsapp_message_media( mediaId='string', originationPhoneNumberId='string' ) Parameters: * **mediaId** (*string*) -- **[REQUIRED]** The unique identifier of the media file to delete. Use the "mediaId" returned from PostWhatsAppMessageMedia. * **originationPhoneNumberId** (*string*) -- **[REQUIRED]** The unique identifier of the originating phone number associated with the media. Phone number identifiers are formatted as "phone-number- id-01234567890123456789012345678901". Use GetLinkedWhatsAppBusinessAccount to find a phone number's id. Return type: dict Returns: **Response Syntax** { 'success': True|False } **Response Structure** * *(dict) --* * **success** *(boolean) --* Success indicator for deleting the media file. **Exceptions** * "EndUserMessagingSocial.Client.exceptions.ValidationException" * "EndUserMessagingSocial.Client.exceptions.AccessDeniedException" * "EndUserMessagingSocial.Client.exceptions.ResourceNotFoundExcept ion" * "EndUserMessagingSocial.Client.exceptions.InvalidParametersExcep tion" * "EndUserMessagingSocial.Client.exceptions.ThrottledRequestExcept ion" * "EndUserMessagingSocial.Client.exceptions.AccessDeniedByMetaExce ption" * "EndUserMessagingSocial.Client.exceptions.InternalServiceExcepti on" * "EndUserMessagingSocial.Client.exceptions.DependencyException" EndUserMessagingSocial / Client / associate_whatsapp_business_account associate_whatsapp_business_account *********************************** EndUserMessagingSocial.Client.associate_whatsapp_business_account(**kwargs) This is only used through the Amazon Web Services console during sign-up to associate your WhatsApp Business Account to your Amazon Web Services account. See also: AWS API Documentation **Request Syntax** response = client.associate_whatsapp_business_account( signupCallback={ 'accessToken': 'string', 'callbackUrl': 'string' }, setupFinalization={ 'associateInProgressToken': 'string', 'phoneNumbers': [ { 'id': 'string', 'twoFactorPin': 'string', 'dataLocalizationRegion': 'string', 'tags': [ { 'key': 'string', 'value': 'string' }, ] }, ], 'phoneNumberParent': 'string', 'waba': { 'id': 'string', 'eventDestinations': [ { 'eventDestinationArn': 'string', 'roleArn': 'string' }, ], 'tags': [ { 'key': 'string', 'value': 'string' }, ] } } ) Parameters: * **signupCallback** (*dict*) -- Contains the callback access token. * **accessToken** *(string) --* **[REQUIRED]** The access token for your WhatsApp Business Account. The "accessToken" value is provided by Meta. * **callbackUrl** *(string) --* The URL where WhatsApp will send callback notifications for this account. * **setupFinalization** (*dict*) -- A JSON object that contains the phone numbers and WhatsApp Business Account to link to your account. * **associateInProgressToken** *(string) --* **[REQUIRED]** An Amazon Web Services access token generated by "WhatsAppSignupCallback" and used by "WhatsAppSetupFinalization". * **phoneNumbers** *(list) --* **[REQUIRED]** An array of WabaPhoneNumberSetupFinalization objects containing the details of each phone number associated with the WhatsApp Business Account. * *(dict) --* The registration details for a linked phone number. * **id** *(string) --* **[REQUIRED]** The unique identifier of the originating phone number associated with the media. Phone number identifiers are formatted as "phone-number- id-01234567890123456789012345678901". Use GetLinkedWhatsAppBusinessAccount to find a phone number's id. * **twoFactorPin** *(string) --* **[REQUIRED]** The PIN to use for two-step verification. To reset your PIN follow the directions in Updating PIN in the *WhatsApp Business Platform Cloud API Reference*. * **dataLocalizationRegion** *(string) --* The two letter ISO region for the location of where Meta will store data. **Asia–Pacific (APAC)** * Australia **AU** * Indonesia **ID** * India **IN** * Japan **JP** * Singapore **SG** * South Korea **KR** **Europe** * Germany **DE** * Switzerland **CH** * United Kingdom **GB** **Latin America (LATAM)** * Brazil **BR** **Middle East and Africa (MEA)** * Bahrain **BH** * South Africa **ZA** * United Arab Emirates **AE** **North America (NORAM)** * Canada **CA** * **tags** *(list) --* An array of key and value pair tags. * *(dict) --* The tag for a resource. * **key** *(string) --* **[REQUIRED]** The tag key. * **value** *(string) --* The tag value. * **phoneNumberParent** *(string) --* Used to add a new phone number to an existing WhatsApp Business Account. This field can't be used when the "waba" field is present. * **waba** *(dict) --* Used to create a new WhatsApp Business Account and add a phone number. This field can't be used when the "phoneNumberParent" field is present. * **id** *(string) --* The ID of the linked WhatsApp Business Account, formatted as "waba-01234567890123456789012345678901". * **eventDestinations** *(list) --* The event destinations for the linked WhatsApp Business Account. * *(dict) --* Contains information on the event destination. * **eventDestinationArn** *(string) --* **[REQUIRED]** The ARN of the event destination. * **roleArn** *(string) --* The Amazon Resource Name (ARN) of an Identity and Access Management role that is able to import phone numbers and write events. * **tags** *(list) --* An array of key and value pair tags. * *(dict) --* The tag for a resource. * **key** *(string) --* **[REQUIRED]** The tag key. * **value** *(string) --* The tag value. Return type: dict Returns: **Response Syntax** { 'signupCallbackResult': { 'associateInProgressToken': 'string', 'linkedAccountsWithIncompleteSetup': { 'string': { 'accountName': 'string', 'registrationStatus': 'COMPLETE'|'INCOMPLETE', 'unregisteredWhatsAppPhoneNumbers': [ { 'arn': 'string', 'phoneNumber': 'string', 'phoneNumberId': 'string', 'metaPhoneNumberId': 'string', 'displayPhoneNumberName': 'string', 'displayPhoneNumber': 'string', 'qualityRating': 'string', 'dataLocalizationRegion': 'string' }, ], 'wabaId': 'string' } } }, 'statusCode': 123 } **Response Structure** * *(dict) --* * **signupCallbackResult** *(dict) --* Contains your WhatsApp registration status. * **associateInProgressToken** *(string) --* An Amazon Web Services access token generated by "WhatsAppSignupCallback" and used by "WhatsAppSetupFinalization". * **linkedAccountsWithIncompleteSetup** *(dict) --* A LinkedWhatsAppBusinessAccountIdMetaData object map containing the details of any WhatsAppBusiness accounts that have incomplete setup. * *(string) --* * *(dict) --* Contains your WhatsApp registration status and details of any unregistered WhatsApp phone number. * **accountName** *(string) --* The name of your account. * **registrationStatus** *(string) --* The registration status of the linked WhatsApp Business Account. * **unregisteredWhatsAppPhoneNumbers** *(list) --* The details for unregistered WhatsApp phone numbers. * *(dict) --* The details of your WhatsApp phone number. * **arn** *(string) --* The ARN of the WhatsApp phone number. * **phoneNumber** *(string) --* The phone number for sending WhatsApp. * **phoneNumberId** *(string) --* The phone number ID. Phone number identifiers are formatted as "phone-number- id-01234567890123456789012345678901". * **metaPhoneNumberId** *(string) --* The phone number ID from Meta. * **displayPhoneNumberName** *(string) --* The display name for this phone number. * **displayPhoneNumber** *(string) --* The phone number that appears in the recipients display. * **qualityRating** *(string) --* The quality rating of the phone number. * **dataLocalizationRegion** *(string) --* The geographic region where the WhatsApp phone number's data is stored and processed. * **wabaId** *(string) --* The Amazon Resource Name (ARN) of the WhatsApp Business Account ID. * **statusCode** *(integer) --* The status code for the response. **Exceptions** * "EndUserMessagingSocial.Client.exceptions.ValidationException" * "EndUserMessagingSocial.Client.exceptions.LimitExceededException" * "EndUserMessagingSocial.Client.exceptions.AccessDeniedException" * "EndUserMessagingSocial.Client.exceptions.InvalidParametersExcep tion" * "EndUserMessagingSocial.Client.exceptions.ThrottledRequestExcept ion" * "EndUserMessagingSocial.Client.exceptions.DependencyException" EndUserMessagingSocial / Client / get_waiter get_waiter ********** EndUserMessagingSocial.Client.get_waiter(waiter_name) Returns an object that can wait for some condition. Parameters: **waiter_name** (*str*) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters. Returns: The specified waiter object. Return type: "botocore.waiter.Waiter" EndUserMessagingSocial / Client / send_whatsapp_message send_whatsapp_message ********************* 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 in the *Amazon Web Services End User Messaging Social User Guide* . See also: AWS API Documentation **Request Syntax** response = client.send_whatsapp_message( originationPhoneNumberId='string', message=b'bytes', metaApiVersion='string' ) Parameters: * **originationPhoneNumberId** (*string*) -- **[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 to find a phone number's id. * **message** (*bytes*) -- **[REQUIRED]** 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*. * **metaApiVersion** (*string*) -- **[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 in the *Amazon Web Services General Reference*. Return type: dict Returns: **Response Syntax** { 'messageId': 'string' } **Response Structure** * *(dict) --* * **messageId** *(string) --* The unique identifier of the message. **Exceptions** * "EndUserMessagingSocial.Client.exceptions.ValidationException" * "EndUserMessagingSocial.Client.exceptions.AccessDeniedException" * "EndUserMessagingSocial.Client.exceptions.ResourceNotFoundExcept ion" * "EndUserMessagingSocial.Client.exceptions.InvalidParametersExcep tion" * "EndUserMessagingSocial.Client.exceptions.ThrottledRequestExcept ion" * "EndUserMessagingSocial.Client.exceptions.InternalServiceExcepti on" * "EndUserMessagingSocial.Client.exceptions.DependencyException" EndUserMessagingSocial / Client / create_whatsapp_message_template create_whatsapp_message_template ******************************** EndUserMessagingSocial.Client.create_whatsapp_message_template(**kwargs) Creates a new WhatsApp message template from a custom definition. See also: AWS API Documentation **Request Syntax** response = client.create_whatsapp_message_template( templateDefinition=b'bytes', id='string' ) Parameters: * **templateDefinition** (*bytes*) -- **[REQUIRED]** The complete template definition as a JSON blob. * **id** (*string*) -- **[REQUIRED]** The ID of the WhatsApp Business Account to associate with this template. Return type: dict Returns: **Response Syntax** { 'metaTemplateId': 'string', 'templateStatus': 'string', 'category': 'string' } **Response Structure** * *(dict) --* * **metaTemplateId** *(string) --* The numeric ID assigned to the template by Meta. * **templateStatus** *(string) --* The status of the created template, such as PENDING or APPROVED.. * **category** *(string) --* The category of the template, such as UTILITY or MARKETING. **Exceptions** * "EndUserMessagingSocial.Client.exceptions.ValidationException" * "EndUserMessagingSocial.Client.exceptions.AccessDeniedException" * "EndUserMessagingSocial.Client.exceptions.ResourceNotFoundExcept ion" * "EndUserMessagingSocial.Client.exceptions.InvalidParametersExcep tion" * "EndUserMessagingSocial.Client.exceptions.ThrottledRequestExcept ion" * "EndUserMessagingSocial.Client.exceptions.InternalServiceExcepti on" * "EndUserMessagingSocial.Client.exceptions.DependencyException" EndUserMessagingSocial / Client / create_whatsapp_message_template_from_library create_whatsapp_message_template_from_library ********************************************* EndUserMessagingSocial.Client.create_whatsapp_message_template_from_library(**kwargs) Creates a new WhatsApp message template using a template from Meta's template library. See also: AWS API Documentation **Request Syntax** response = client.create_whatsapp_message_template_from_library( metaLibraryTemplate={ 'templateName': 'string', 'libraryTemplateName': 'string', 'templateCategory': 'string', 'templateLanguage': 'string', 'libraryTemplateButtonInputs': [ { 'type': 'string', 'phoneNumber': 'string', 'url': { 'string': 'string' }, 'otpType': 'string', 'zeroTapTermsAccepted': True|False, 'supportedApps': [ { 'string': 'string' }, ] }, ], 'libraryTemplateBodyInputs': { 'addContactNumber': True|False, 'addLearnMoreLink': True|False, 'addSecurityRecommendation': True|False, 'addTrackPackageLink': True|False, 'codeExpirationMinutes': 123 } }, id='string' ) Parameters: * **metaLibraryTemplate** (*dict*) -- **[REQUIRED]** The template configuration from Meta's library, including customizations for buttons and body text. * **templateName** *(string) --* **[REQUIRED]** The name to assign to the template. * **libraryTemplateName** *(string) --* **[REQUIRED]** The name of the template in Meta's library. * **templateCategory** *(string) --* **[REQUIRED]** The category of the template (for example, UTILITY or MARKETING). * **templateLanguage** *(string) --* **[REQUIRED]** The language code for the template (for example, en_US). * **libraryTemplateButtonInputs** *(list) --* Button customizations for the template. * *(dict) --* Configuration options for customizing buttons in a template from Meta's library. * **type** *(string) --* The type of button (for example, QUICK_REPLY, CALL, or URL). * **phoneNumber** *(string) --* The phone number in E.164 format for CALL-type buttons. * **url** *(dict) --* The URL with dynamic parameters for URL-type buttons. * *(string) --* * *(string) --* * **otpType** *(string) --* The type of one-time password for OTP buttons. * **zeroTapTermsAccepted** *(boolean) --* When true, indicates acceptance of zero-tap terms for the button. * **supportedApps** *(list) --* List of supported applications for this button type. * *(dict) --* * *(string) --* * *(string) --* * **libraryTemplateBodyInputs** *(dict) --* Body text customizations for the template. * **addContactNumber** *(boolean) --* When true, includes a contact number in the template body. * **addLearnMoreLink** *(boolean) --* When true, includes a "learn more" link in the template body. * **addSecurityRecommendation** *(boolean) --* When true, includes security recommendations in the template body. * **addTrackPackageLink** *(boolean) --* When true, includes a package tracking link in the template body. * **codeExpirationMinutes** *(integer) --* The number of minutes until a verification code or OTP expires. * **id** (*string*) -- **[REQUIRED]** The ID of the WhatsApp Business Account to associate with this template. Return type: dict Returns: **Response Syntax** { 'metaTemplateId': 'string', 'templateStatus': 'string', 'category': 'string' } **Response Structure** * *(dict) --* * **metaTemplateId** *(string) --* The numeric ID assigned to the template by Meta. * **templateStatus** *(string) --* The status of the created template (for example, PENDING or APPROVED). * **category** *(string) --* The category of the template (for example, UTILITY or MARKETING). **Exceptions** * "EndUserMessagingSocial.Client.exceptions.ValidationException" * "EndUserMessagingSocial.Client.exceptions.AccessDeniedException" * "EndUserMessagingSocial.Client.exceptions.ResourceNotFoundExcept ion" * "EndUserMessagingSocial.Client.exceptions.InvalidParametersExcep tion" * "EndUserMessagingSocial.Client.exceptions.ThrottledRequestExcept ion" * "EndUserMessagingSocial.Client.exceptions.InternalServiceExcepti on" * "EndUserMessagingSocial.Client.exceptions.DependencyException" EndUserMessagingSocial / Client / disassociate_whatsapp_business_account disassociate_whatsapp_business_account ************************************** EndUserMessagingSocial.Client.disassociate_whatsapp_business_account(**kwargs) Disassociate a WhatsApp Business Account (WABA) from your Amazon Web Services account. See also: AWS API Documentation **Request Syntax** response = client.disassociate_whatsapp_business_account( id='string' ) Parameters: **id** (*string*) -- **[REQUIRED]** The unique identifier of your WhatsApp Business Account. WABA identifiers are formatted as "waba-01234567890123456789012345678901". Use ListLinkedWhatsAppBusinessAccounts to list all WABAs and their details. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "EndUserMessagingSocial.Client.exceptions.ValidationException" * "EndUserMessagingSocial.Client.exceptions.AccessDeniedException" * "EndUserMessagingSocial.Client.exceptions.ResourceNotFoundExcept ion" * "EndUserMessagingSocial.Client.exceptions.InvalidParametersExcep tion" * "EndUserMessagingSocial.Client.exceptions.ThrottledRequestExcept ion" * "EndUserMessagingSocial.Client.exceptions.DependencyException" EndUserMessagingSocial / Client / list_linked_whatsapp_business_accounts list_linked_whatsapp_business_accounts ************************************** EndUserMessagingSocial.Client.list_linked_whatsapp_business_accounts(**kwargs) List all WhatsApp Business Accounts linked to your Amazon Web Services account. See also: AWS API Documentation **Request Syntax** response = client.list_linked_whatsapp_business_accounts( nextToken='string', maxResults=123 ) Parameters: * **nextToken** (*string*) -- The next token for pagination. * **maxResults** (*integer*) -- The maximum number of results to return. Return type: dict Returns: **Response Syntax** { 'linkedAccounts': [ { 'arn': 'string', 'id': 'string', 'wabaId': 'string', 'registrationStatus': 'COMPLETE'|'INCOMPLETE', 'linkDate': datetime(2015, 1, 1), 'wabaName': 'string', 'eventDestinations': [ { 'eventDestinationArn': 'string', 'roleArn': 'string' }, ] }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **linkedAccounts** *(list) --* A list of WhatsApp Business Accounts linked to your Amazon Web Services account. * *(dict) --* The details of a linked WhatsApp Business Account. * **arn** *(string) --* The ARN of the linked WhatsApp Business Account. * **id** *(string) --* The ID of the linked WhatsApp Business Account, formatted as "waba-01234567890123456789012345678901". * **wabaId** *(string) --* The WhatsApp Business Account ID provided by Meta. * **registrationStatus** *(string) --* The registration status of the linked WhatsApp Business Account. * **linkDate** *(datetime) --* The date the WhatsApp Business Account was linked. * **wabaName** *(string) --* The name of the linked WhatsApp Business Account. * **eventDestinations** *(list) --* The event destinations for the linked WhatsApp Business Account. * *(dict) --* Contains information on the event destination. * **eventDestinationArn** *(string) --* The ARN of the event destination. * **roleArn** *(string) --* The Amazon Resource Name (ARN) of an Identity and Access Management role that is able to import phone numbers and write events. * **nextToken** *(string) --* The next token for pagination. **Exceptions** * "EndUserMessagingSocial.Client.exceptions.ValidationException" * "EndUserMessagingSocial.Client.exceptions.AccessDeniedException" * "EndUserMessagingSocial.Client.exceptions.ResourceNotFoundExcept ion" * "EndUserMessagingSocial.Client.exceptions.InvalidParametersExcep tion" * "EndUserMessagingSocial.Client.exceptions.ThrottledRequestExcept ion" * "EndUserMessagingSocial.Client.exceptions.InternalServiceExcepti on" EndUserMessagingSocial / Client / close close ***** EndUserMessagingSocial.Client.close() Closes underlying endpoint connections. EndUserMessagingSocial / Client / list_whatsapp_template_library list_whatsapp_template_library ****************************** EndUserMessagingSocial.Client.list_whatsapp_template_library(**kwargs) Lists templates available in Meta's template library for WhatsApp messaging. See also: AWS API Documentation **Request Syntax** response = client.list_whatsapp_template_library( nextToken='string', maxResults=123, id='string', filters={ 'string': 'string' } ) Parameters: * **nextToken** (*string*) -- The token for the next page of results. * **maxResults** (*integer*) -- The maximum number of results to return per page (1-100). * **id** (*string*) -- **[REQUIRED]** The ID of the WhatsApp Business Account to list library templates for. * **filters** (*dict*) -- Map of filters to apply (searchKey, topic, usecase, industry, language). * *(string) --* * *(string) --* Return type: dict Returns: **Response Syntax** { 'metaLibraryTemplates': [ { 'templateName': 'string', 'templateLanguage': 'string', 'templateCategory': 'string', 'templateTopic': 'string', 'templateUseCase': 'string', 'templateIndustry': [ 'string', ], 'templateHeader': 'string', 'templateBody': 'string', 'templateButtons': [ { 'type': 'string', 'text': 'string', 'phoneNumber': 'string', 'url': 'string', 'otpType': 'string', 'zeroTapTermsAccepted': True|False, 'supportedApps': [ { 'string': 'string' }, ] }, ], 'templateId': 'string' }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **metaLibraryTemplates** *(list) --* A list of templates from Meta's library. * *(dict) --* Defines the complete structure and content of a template in Meta's library. * **templateName** *(string) --* The name of the template. * **templateLanguage** *(string) --* The language code for the template (for example, en_US). * **templateCategory** *(string) --* The category of the template (for example, UTILITY or MARKETING). * **templateTopic** *(string) --* The topic or subject matter of the template. * **templateUseCase** *(string) --* The intended use case for the template. * **templateIndustry** *(list) --* The industries the template is designed for. * *(string) --* * **templateHeader** *(string) --* The header text of the template. * **templateBody** *(string) --* The body text of the template. * **templateButtons** *(list) --* The buttons included in the template. * *(dict) --* Defines a button in a template from Meta's library. * **type** *(string) --* The type of button (for example, QUICK_REPLY, CALL, or URL). * **text** *(string) --* The text displayed on the button (maximum 40 characters). * **phoneNumber** *(string) --* The phone number in E.164 format for CALL-type buttons. * **url** *(string) --* The URL for URL-type buttons. * **otpType** *(string) --* The type of one-time password for OTP buttons. * **zeroTapTermsAccepted** *(boolean) --* When true, indicates acceptance of zero-tap terms for the button. * **supportedApps** *(list) --* List of supported applications for this button type. * *(dict) --* * *(string) --* * *(string) --* * **templateId** *(string) --* The ID of the template in Meta's library. * **nextToken** *(string) --* The token to retrieve the next page of results, if any. **Exceptions** * "EndUserMessagingSocial.Client.exceptions.ValidationException" * "EndUserMessagingSocial.Client.exceptions.AccessDeniedException" * "EndUserMessagingSocial.Client.exceptions.ResourceNotFoundExcept ion" * "EndUserMessagingSocial.Client.exceptions.InvalidParametersExcep tion" * "EndUserMessagingSocial.Client.exceptions.ThrottledRequestExcept ion" * "EndUserMessagingSocial.Client.exceptions.InternalServiceExcepti on" * "EndUserMessagingSocial.Client.exceptions.DependencyException" EndUserMessagingSocial / Client / get_linked_whatsapp_business_account_phone_number get_linked_whatsapp_business_account_phone_number ************************************************* EndUserMessagingSocial.Client.get_linked_whatsapp_business_account_phone_number(**kwargs) Use your WhatsApp phone number id to get the WABA account id and phone number details. See also: AWS API Documentation **Request Syntax** response = client.get_linked_whatsapp_business_account_phone_number( id='string' ) Parameters: **id** (*string*) -- **[REQUIRED]** The unique identifier of the phone number. Phone number identifiers are formatted as "phone-number- id-01234567890123456789012345678901". Use GetLinkedWhatsAppBusinessAccount to find a phone number's id. Return type: dict Returns: **Response Syntax** { 'phoneNumber': { 'arn': 'string', 'phoneNumber': 'string', 'phoneNumberId': 'string', 'metaPhoneNumberId': 'string', 'displayPhoneNumberName': 'string', 'displayPhoneNumber': 'string', 'qualityRating': 'string', 'dataLocalizationRegion': 'string' }, 'linkedWhatsAppBusinessAccountId': 'string' } **Response Structure** * *(dict) --* * **phoneNumber** *(dict) --* The details of your WhatsApp phone number. * **arn** *(string) --* The ARN of the WhatsApp phone number. * **phoneNumber** *(string) --* The phone number for sending WhatsApp. * **phoneNumberId** *(string) --* The phone number ID. Phone number identifiers are formatted as "phone-number- id-01234567890123456789012345678901". * **metaPhoneNumberId** *(string) --* The phone number ID from Meta. * **displayPhoneNumberName** *(string) --* The display name for this phone number. * **displayPhoneNumber** *(string) --* The phone number that appears in the recipients display. * **qualityRating** *(string) --* The quality rating of the phone number. * **dataLocalizationRegion** *(string) --* The geographic region where the WhatsApp phone number's data is stored and processed. * **linkedWhatsAppBusinessAccountId** *(string) --* The WABA identifier linked to the phone number, formatted as "waba-01234567890123456789012345678901". **Exceptions** * "EndUserMessagingSocial.Client.exceptions.ValidationException" * "EndUserMessagingSocial.Client.exceptions.AccessDeniedException" * "EndUserMessagingSocial.Client.exceptions.ResourceNotFoundExcept ion" * "EndUserMessagingSocial.Client.exceptions.InvalidParametersExcep tion" * "EndUserMessagingSocial.Client.exceptions.ThrottledRequestExcept ion" * "EndUserMessagingSocial.Client.exceptions.InternalServiceExcepti on" * "EndUserMessagingSocial.Client.exceptions.DependencyException" EndUserMessagingSocial / Client / delete_whatsapp_message_template delete_whatsapp_message_template ******************************** EndUserMessagingSocial.Client.delete_whatsapp_message_template(**kwargs) Deletes a WhatsApp message template. See also: AWS API Documentation **Request Syntax** response = client.delete_whatsapp_message_template( metaTemplateId='string', deleteAllLanguages=True|False, id='string', templateName='string' ) Parameters: * **metaTemplateId** (*string*) -- The numeric ID of the template assigned by Meta. * **deleteAllLanguages** (*boolean*) -- If true, deletes all language versions of the template. * **id** (*string*) -- **[REQUIRED]** The ID of the WhatsApp Business Account associated with this template. * **templateName** (*string*) -- **[REQUIRED]** The name of the template to delete. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "EndUserMessagingSocial.Client.exceptions.ValidationException" * "EndUserMessagingSocial.Client.exceptions.AccessDeniedException" * "EndUserMessagingSocial.Client.exceptions.ResourceNotFoundExcept ion" * "EndUserMessagingSocial.Client.exceptions.InvalidParametersExcep tion" * "EndUserMessagingSocial.Client.exceptions.ThrottledRequestExcept ion" * "EndUserMessagingSocial.Client.exceptions.InternalServiceExcepti on" * "EndUserMessagingSocial.Client.exceptions.DependencyException" EndUserMessagingSocial / Client / get_linked_whatsapp_business_account get_linked_whatsapp_business_account ************************************ EndUserMessagingSocial.Client.get_linked_whatsapp_business_account(**kwargs) Get the details of your linked WhatsApp Business Account. See also: AWS API Documentation **Request Syntax** response = client.get_linked_whatsapp_business_account( id='string' ) Parameters: **id** (*string*) -- **[REQUIRED]** The unique identifier, from Amazon Web Services, of the linked WhatsApp Business Account. WABA identifiers are formatted as "waba-01234567890123456789012345678901". Use ListLinkedWhatsAppBusinessAccounts to list all WABAs and their details. Return type: dict Returns: **Response Syntax** { 'account': { 'arn': 'string', 'id': 'string', 'wabaId': 'string', 'registrationStatus': 'COMPLETE'|'INCOMPLETE', 'linkDate': datetime(2015, 1, 1), 'wabaName': 'string', 'eventDestinations': [ { 'eventDestinationArn': 'string', 'roleArn': 'string' }, ], 'phoneNumbers': [ { 'arn': 'string', 'phoneNumber': 'string', 'phoneNumberId': 'string', 'metaPhoneNumberId': 'string', 'displayPhoneNumberName': 'string', 'displayPhoneNumber': 'string', 'qualityRating': 'string', 'dataLocalizationRegion': 'string' }, ] } } **Response Structure** * *(dict) --* * **account** *(dict) --* The details of the linked WhatsApp Business Account. * **arn** *(string) --* The ARN of the linked WhatsApp Business Account. * **id** *(string) --* The ID of the linked WhatsApp Business Account, formatted as "waba-01234567890123456789012345678901". * **wabaId** *(string) --* The WhatsApp Business Account ID from meta. * **registrationStatus** *(string) --* The registration status of the linked WhatsApp Business Account. * **linkDate** *(datetime) --* The date the WhatsApp Business Account was linked. * **wabaName** *(string) --* The name of the linked WhatsApp Business Account. * **eventDestinations** *(list) --* The event destinations for the linked WhatsApp Business Account. * *(dict) --* Contains information on the event destination. * **eventDestinationArn** *(string) --* The ARN of the event destination. * **roleArn** *(string) --* The Amazon Resource Name (ARN) of an Identity and Access Management role that is able to import phone numbers and write events. * **phoneNumbers** *(list) --* The phone numbers associated with the Linked WhatsApp Business Account. * *(dict) --* The details of a linked phone number. * **arn** *(string) --* The full Amazon Resource Name (ARN) for the phone number. * **phoneNumber** *(string) --* The phone number associated with the Linked WhatsApp Business Account. * **phoneNumberId** *(string) --* The phone number ID. Phone number identifiers are formatted as "phone-number- id-01234567890123456789012345678901". * **metaPhoneNumberId** *(string) --* The phone number ID from Meta. * **displayPhoneNumberName** *(string) --* The display name for this phone number. * **displayPhoneNumber** *(string) --* The phone number that appears in the recipients display. * **qualityRating** *(string) --* The quality rating of the phone number. This is from Meta. * **dataLocalizationRegion** *(string) --* The geographic region where the WhatsApp phone number's data is stored and processed. **Exceptions** * "EndUserMessagingSocial.Client.exceptions.ValidationException" * "EndUserMessagingSocial.Client.exceptions.AccessDeniedException" * "EndUserMessagingSocial.Client.exceptions.ResourceNotFoundExcept ion" * "EndUserMessagingSocial.Client.exceptions.InvalidParametersExcep tion" * "EndUserMessagingSocial.Client.exceptions.ThrottledRequestExcept ion" * "EndUserMessagingSocial.Client.exceptions.InternalServiceExcepti on" * "EndUserMessagingSocial.Client.exceptions.DependencyException" EndUserMessagingSocial / Client / get_whatsapp_message_template get_whatsapp_message_template ***************************** EndUserMessagingSocial.Client.get_whatsapp_message_template(**kwargs) Retrieves a specific WhatsApp message template. See also: AWS API Documentation **Request Syntax** response = client.get_whatsapp_message_template( metaTemplateId='string', id='string' ) Parameters: * **metaTemplateId** (*string*) -- **[REQUIRED]** The numeric ID of the template assigned by Meta. * **id** (*string*) -- **[REQUIRED]** The ID of the WhatsApp Business Account associated with this template. Return type: dict Returns: **Response Syntax** { 'template': 'string' } **Response Structure** * *(dict) --* * **template** *(string) --* The complete template definition as a JSON string (maximum 6000 characters). **Exceptions** * "EndUserMessagingSocial.Client.exceptions.ValidationException" * "EndUserMessagingSocial.Client.exceptions.AccessDeniedException" * "EndUserMessagingSocial.Client.exceptions.ResourceNotFoundExcept ion" * "EndUserMessagingSocial.Client.exceptions.InvalidParametersExcep tion" * "EndUserMessagingSocial.Client.exceptions.ThrottledRequestExcept ion" * "EndUserMessagingSocial.Client.exceptions.InternalServiceExcepti on" * "EndUserMessagingSocial.Client.exceptions.DependencyException" EndUserMessagingSocial / Client / tag_resource tag_resource ************ EndUserMessagingSocial.Client.tag_resource(**kwargs) Adds or overwrites only the specified tags for the specified resource. When you specify an existing tag key, the value is overwritten with the new value. See also: AWS API Documentation **Request Syntax** response = client.tag_resource( resourceArn='string', tags=[ { 'key': 'string', 'value': 'string' }, ] ) Parameters: * **resourceArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the resource to tag. * **tags** (*list*) -- **[REQUIRED]** The tags to add to the resource. * *(dict) --* The tag for a resource. * **key** *(string) --* **[REQUIRED]** The tag key. * **value** *(string) --* The tag value. Return type: dict Returns: **Response Syntax** { 'statusCode': 123 } **Response Structure** * *(dict) --* * **statusCode** *(integer) --* The status code of the tag resource operation. **Exceptions** * "EndUserMessagingSocial.Client.exceptions.ValidationException" * "EndUserMessagingSocial.Client.exceptions.AccessDeniedException" * "EndUserMessagingSocial.Client.exceptions.InvalidParametersExcep tion" * "EndUserMessagingSocial.Client.exceptions.ThrottledRequestExcept ion" * "EndUserMessagingSocial.Client.exceptions.InternalServiceExcepti on" EndUserMessagingSocial / Client / update_whatsapp_message_template update_whatsapp_message_template ******************************** EndUserMessagingSocial.Client.update_whatsapp_message_template(**kwargs) Updates an existing WhatsApp message template. See also: AWS API Documentation **Request Syntax** response = client.update_whatsapp_message_template( id='string', metaTemplateId='string', templateCategory='string', templateComponents=b'bytes' ) Parameters: * **id** (*string*) -- **[REQUIRED]** The ID of the WhatsApp Business Account associated with this template. * **metaTemplateId** (*string*) -- **[REQUIRED]** The numeric ID of the template assigned by Meta. * **templateCategory** (*string*) -- The new category for the template (for example, UTILITY or MARKETING). * **templateComponents** (*bytes*) -- The updated components of the template as a JSON blob (maximum 3000 characters). Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "EndUserMessagingSocial.Client.exceptions.ValidationException" * "EndUserMessagingSocial.Client.exceptions.AccessDeniedException" * "EndUserMessagingSocial.Client.exceptions.ResourceNotFoundExcept ion" * "EndUserMessagingSocial.Client.exceptions.InvalidParametersExcep tion" * "EndUserMessagingSocial.Client.exceptions.ThrottledRequestExcept ion" * "EndUserMessagingSocial.Client.exceptions.InternalServiceExcepti on" * "EndUserMessagingSocial.Client.exceptions.DependencyException" EndUserMessagingSocial / Client / get_whatsapp_message_media get_whatsapp_message_media ************************** EndUserMessagingSocial.Client.get_whatsapp_message_media(**kwargs) Get a media file from the WhatsApp service. On successful completion the media file is retrieved from Meta and stored in the specified Amazon S3 bucket. Use either "destinationS3File" or "destinationS3PresignedUrl" for the destination. If both are used then an "InvalidParameterException" is returned. See also: AWS API Documentation **Request Syntax** response = client.get_whatsapp_message_media( mediaId='string', originationPhoneNumberId='string', metadataOnly=True|False, destinationS3PresignedUrl={ 'url': 'string', 'headers': { 'string': 'string' } }, destinationS3File={ 'bucketName': 'string', 'key': 'string' } ) Parameters: * **mediaId** (*string*) -- **[REQUIRED]** The unique identifier for the media file. * **originationPhoneNumberId** (*string*) -- **[REQUIRED]** The unique identifier of the originating phone number for the WhatsApp message media. The phone number identifiers are formatted as "phone-number- id-01234567890123456789012345678901". Use GetLinkedWhatsAppBusinessAccount to find a phone number's id. * **metadataOnly** (*boolean*) -- Set to "True" to get only the metadata for the file. * **destinationS3PresignedUrl** (*dict*) -- The presign url of the media file. * **url** *(string) --* **[REQUIRED]** The presign url to the object. * **headers** *(dict) --* **[REQUIRED]** A map of headers and their values. You must specify the "Content-Type" header when using "PostWhatsAppMessageMedia". For a list of common headers, see Common Request Headers in the *Amazon S3 API Reference* * *(string) --* * *(string) --* * **destinationS3File** (*dict*) -- The "bucketName" and "key" of the S3 media file. * **bucketName** *(string) --* **[REQUIRED]** The bucket name. * **key** *(string) --* **[REQUIRED]** The object key of the media file. Return type: dict Returns: **Response Syntax** { 'mimeType': 'string', 'fileSize': 123 } **Response Structure** * *(dict) --* * **mimeType** *(string) --* The MIME type of the media. * **fileSize** *(integer) --* The file size of the media, in KB. **Exceptions** * "EndUserMessagingSocial.Client.exceptions.ValidationException" * "EndUserMessagingSocial.Client.exceptions.AccessDeniedException" * "EndUserMessagingSocial.Client.exceptions.ResourceNotFoundExcept ion" * "EndUserMessagingSocial.Client.exceptions.InvalidParametersExcep tion" * "EndUserMessagingSocial.Client.exceptions.ThrottledRequestExcept ion" * "EndUserMessagingSocial.Client.exceptions.AccessDeniedByMetaExce ption" * "EndUserMessagingSocial.Client.exceptions.InternalServiceExcepti on" * "EndUserMessagingSocial.Client.exceptions.DependencyException"