EndUserMessagingSocial / Client / get_whatsapp_call_permission
get_whatsapp_call_permission¶
- EndUserMessagingSocial.Client.get_whatsapp_call_permission(**kwargs)¶
Retrieves the current calling permission for a WhatsApp end user, along with the calling actions the business is allowed to take with that user. Provide the destination phone number or the business-scoped user ID to identify the end user.
See also: AWS API Documentation
Request Syntax
response = client.get_whatsapp_call_permission( originationPhoneNumberId='string', destinationPhoneNumber='string', endUserBsuid='string' )
- Parameters:
originationPhoneNumberId (string) –
[REQUIRED]
The unique identifier of the business phone number for which to retrieve the calling permission. The phone number identifiers are formatted as
phone-number-id-01234567890123456789012345678901.destinationPhoneNumber (string) – The end user’s phone number, in E.164 format, for which to retrieve the calling permission.
endUserBsuid (string) – The business-scoped user identifier (BSUID) of the end user for which to retrieve the calling permission.
- Return type:
dict
- Returns:
Response Syntax
{ 'permission': { 'status': 'string', 'expirationTime': datetime(2015, 1, 1) }, 'actions': [ { 'actionName': 'string', 'canPerformAction': True|False, 'limits': [ { 'timePeriod': 'string', 'maxAllowed': 123, 'currentUsage': 123, 'limitExpirationTime': datetime(2015, 1, 1) }, ] }, ] }
Response Structure
(dict) –
permission (dict) –
The current calling permission state for the end user.
status (string) –
The permission status for the end user.
expirationTime (datetime) –
The time when a temporary permission expires. This value is absent for permanent permissions and when there is no permission.
actions (list) –
The calling actions the business can take with the end user, and any limits that apply to each action.
(dict) –
Describes a single calling action the business can take with an end user, including whether the action is currently allowed and any limits that apply to it. Returned as an item in the actions list from
GetWhatsAppCallPermission.actionName (string) –
The name of the calling action.
canPerformAction (boolean) –
Specifies whether the business can currently perform the action.
limits (list) –
The time-bound limits that apply to the action.
(dict) –
A time-bound restriction on a calling action, such as the number of calls allowed within a time period.
timePeriod (string) –
The time period over which the limit applies, as an ISO 8601 duration.
maxAllowed (integer) –
The maximum number of times the action is allowed within the time period.
currentUsage (integer) –
The number of times the action has been used within the current time period.
limitExpirationTime (datetime) –
The time when the limit resets. This value is present only when the current usage has reached the maximum allowed.
Exceptions
EndUserMessagingSocial.Client.exceptions.ValidationExceptionEndUserMessagingSocial.Client.exceptions.AccessDeniedExceptionEndUserMessagingSocial.Client.exceptions.InvalidParametersExceptionEndUserMessagingSocial.Client.exceptions.ResourceNotFoundExceptionEndUserMessagingSocial.Client.exceptions.AccessDeniedByMetaExceptionEndUserMessagingSocial.Client.exceptions.ThrottledRequestExceptionEndUserMessagingSocial.Client.exceptions.InternalServiceExceptionEndUserMessagingSocial.Client.exceptions.DependencyException