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' }, 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.
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 byWhatsAppSetupFinalization
.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' }, ], '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 byWhatsAppSetupFinalization
.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.
Exceptions
EndUserMessagingSocial.Client.exceptions.ValidationException
EndUserMessagingSocial.Client.exceptions.AccessDeniedException
EndUserMessagingSocial.Client.exceptions.InvalidParametersException
EndUserMessagingSocial.Client.exceptions.ThrottledRequestException
EndUserMessagingSocial.Client.exceptions.DependencyException