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

******************
create_participant
******************



.. py:method:: Connect.Client.create_participant(**kwargs)

  

  Adds a new participant into an on-going chat contact or webRTC call. For more information, see `Customize chat flow experiences by integrating custom participants <https://docs.aws.amazon.com/connect/latest/adminguide/chat-customize-flow.html>`__ or `Enable multi-user web, in-app, and video calling <https://docs.aws.amazon.com/connect/latest/adminguide/enable-multiuser-inapp.html>`__.

  

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


  **Request Syntax**
  ::

    response = client.create_participant(
        InstanceId='string',
        ContactId='string',
        ClientToken='string',
        ParticipantDetails={
            'ParticipantRole': 'AGENT'|'CUSTOMER'|'SYSTEM'|'CUSTOM_BOT'|'SUPERVISOR',
            'DisplayName': 'string',
            'ParticipantCapabilities': {
                'Video': 'SEND',
                'ScreenShare': 'SEND'
            }
        }
    )
    
  :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 ContactId: string
  :param ContactId: **[REQUIRED]** 

    The identifier of the contact in this instance of Amazon Connect. Supports contacts in the CHAT channel and VOICE (WebRTC) channels. For WebRTC calls, this should be the initial contact ID that was generated when the contact was first created (from the StartWebRTCContact API) in the VOICE channel

    

  
  :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 ParticipantDetails: dict
  :param ParticipantDetails: **[REQUIRED]** 

    Information identifying the participant.

     

    .. warning::

       

      The only valid value for ``ParticipantRole`` is ``CUSTOM_BOT`` for chat contact and ``CUSTOMER`` for voice contact.

      

    

  
    - **ParticipantRole** *(string) --* 

      The role of the participant being added.

      

    
    - **DisplayName** *(string) --* 

      The display name of the participant.

      

    
    - **ParticipantCapabilities** *(dict) --* 

      The configuration for the allowed video and screen sharing capabilities for participants present over the call. For more information, see `Set up in-app, web, video calling, and screen sharing capabilities <https://docs.aws.amazon.com/connect/latest/adminguide/inapp-calling.html>`__ in the *Amazon Connect Administrator Guide*.

      

    
      - **Video** *(string) --* 

        The configuration having the video and screen sharing capabilities for participants over the call.

        

      
      - **ScreenShare** *(string) --* 

        The screen sharing capability that is enabled for the participant. ``SEND`` indicates the participant can share their screen.

        

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

    
    ::

      {
          'ParticipantCredentials': {
              'ParticipantToken': 'string',
              'Expiry': 'string'
          },
          'ParticipantId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **ParticipantCredentials** *(dict) --* 

        The token used by the chat participant to call ``CreateParticipantConnection``. The participant token is valid for the lifetime of a chat participant.

        
        

        - **ParticipantToken** *(string) --* 

          The token used by the chat participant to call `CreateParticipantConnection <https://docs.aws.amazon.com/connect-participant/latest/APIReference/API_CreateParticipantConnection.html>`__. The participant token is valid for the lifetime of a chat participant.

          
        

        - **Expiry** *(string) --* 

          The expiration of the token. It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.

          
    
      

      - **ParticipantId** *(string) --* 

        The identifier for a chat participant. The participantId for a chat participant is the same throughout the chat lifecycle.

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

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

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

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

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

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

  