2024/12/03 - AWS End User Messaging Social - 4 updated api methods
Changes Added support for passing role arn corresponding to the supported event destination
{'setupFinalization': {'waba': {'eventDestinations': {'roleArn': 'string'}}}}Response
{'signupCallbackResult': {'linkedAccountsWithIncompleteSetup': {'wabaId': 'string'}}}
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
client.associate_whatsapp_business_account( signupCallback={ 'accessToken': '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' }, ] } } )
dict
Contains the callback access token.
accessToken (string) -- [REQUIRED]
The access token for your WhatsApp Business Account. The accessToken value is provided by Meta.
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.
dict
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' }, ], '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.
wabaId (string) --
The Amazon Resource Name (ARN) of the WhatsApp Business Account ID.
statusCode (integer) --
The status code for the response.
{'account': {'eventDestinations': {'roleArn': 'string'}}}
Get the details of your linked WhatsApp Business Account.
See also: AWS API Documentation
Request Syntax
client.get_linked_whatsapp_business_account( id='string' )
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.
dict
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' }, ] } }
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.
{'linkedAccounts': {'eventDestinations': {'roleArn': 'string'}}}
List all WhatsApp Business Accounts linked to your Amazon Web Services account.
See also: AWS API Documentation
Request Syntax
client.list_linked_whatsapp_business_accounts( nextToken='string', maxResults=123 )
string
The next token for pagination.
integer
The maximum number of results to return.
dict
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.
{'eventDestinations': {'roleArn': 'string'}}
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
client.put_whatsapp_business_account_event_destinations( id='string', eventDestinations=[ { 'eventDestinationArn': 'string', 'roleArn': 'string' }, ] )
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.
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.
dict
Response Syntax
{}
Response Structure
(dict) --