Connect / Client / create_push_notification_registration
create_push_notification_registration#
- Connect.Client.create_push_notification_registration(**kwargs)#
Creates registration for a device token and a chat contact to receive real-time push notifications. For more information about push notifications, see Set up push notifications in Amazon Connect for mobile chat in the Amazon Connect Administrator Guide.
See also: AWS API Documentation
Request Syntax
response = client.create_push_notification_registration( InstanceId='string', ClientToken='string', PinpointAppArn='string', DeviceToken='string', DeviceType='GCM'|'APNS'|'APNS_SANDBOX', ContactConfiguration={ 'ContactId': 'string', 'ParticipantRole': 'AGENT'|'CUSTOMER'|'SYSTEM'|'CUSTOM_BOT'|'SUPERVISOR', 'IncludeRawMessage': True|False } )
- Parameters:
InstanceId (string) –
[REQUIRED]
The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
ClientToken (string) –
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.
This field is autopopulated if not provided.
PinpointAppArn (string) –
[REQUIRED]
The Amazon Resource Name (ARN) of the Pinpoint application.
DeviceToken (string) –
[REQUIRED]
The push notification token issued by the Apple or Google gateways.
DeviceType (string) –
[REQUIRED]
The device type to use when sending the message.
ContactConfiguration (dict) –
[REQUIRED]
The contact configuration for push notification registration.
ContactId (string) – [REQUIRED]
The identifier of the contact within the Amazon Connect instance.
ParticipantRole (string) –
The role of the participant in the chat conversation.
Note
Only
CUSTOMER
is currently supported. Any other values other thanCUSTOMER
will result in an exception (4xx error).IncludeRawMessage (boolean) –
Whether to include raw connect message in the push notification payload. Default is
False
.
- Return type:
dict
- Returns:
Response Syntax
{ 'RegistrationId': 'string' }
Response Structure
(dict) –
RegistrationId (string) –
The identifier for the registration.
Exceptions
Connect.Client.exceptions.InvalidParameterException
Connect.Client.exceptions.ResourceNotFoundException
Connect.Client.exceptions.ThrottlingException
Connect.Client.exceptions.InternalServiceException
Connect.Client.exceptions.AccessDeniedException
Connect.Client.exceptions.ServiceQuotaExceededException