:doc:`Connect <../../connect>` / Client / create_push_notification_registration

*************************************
create_push_notification_registration
*************************************



.. py:method:: 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 <https://docs.aws.amazon.com/connect/latest/adminguide/enable-push-notifications-for-mobile-chat.html>`__ in the *Amazon Connect Administrator Guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/connect-2017-08-08/CreatePushNotificationRegistration>`_  


  **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
        }
    )
    
  :type InstanceId: string
  :param InstanceId: **[REQUIRED]** 

    The identifier of the Amazon Connect instance. You can `find the instance ID <https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html>`__ in the Amazon Resource Name (ARN) of the instance.

    

  
  :type ClientToken: string
  :param ClientToken: 

    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 <https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/>`__.

    This field is autopopulated if not provided.

  
  :type PinpointAppArn: string
  :param PinpointAppArn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the Pinpoint application.

    

  
  :type DeviceToken: string
  :param DeviceToken: **[REQUIRED]** 

    The push notification token issued by the Apple or Google gateways.

    

  
  :type DeviceType: string
  :param DeviceType: **[REQUIRED]** 

    The device type to use when sending the message.

    

  
  :type ContactConfiguration: dict
  :param ContactConfiguration: **[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 than ``CUSTOMER`` will result in an exception (4xx error).

        

      

    
    - **IncludeRawMessage** *(boolean) --* 

      Whether to include raw connect message in the push notification payload. Default is ``False``.

      

    
  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'RegistrationId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **RegistrationId** *(string) --* 

        The identifier for the registration.

        
  
  **Exceptions**
  
  *   :py:class:`Connect.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`Connect.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`Connect.Client.exceptions.ThrottlingException`

  
  *   :py:class:`Connect.Client.exceptions.InternalServiceException`

  
  *   :py:class:`Connect.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`Connect.Client.exceptions.ServiceQuotaExceededException`

  