:doc:`ivschat <../../ivschat>` / Client / disconnect_user

***************
disconnect_user
***************



.. py:method:: ivschat.Client.disconnect_user(**kwargs)

  

  Disconnects all connections using a specified user ID from a room. This replicates the `DisconnectUser <https://docs.aws.amazon.com/ivs/latest/chatmsgapireference/actions-disconnectuser-publish.html>`__ WebSocket operation in the Amazon IVS Chat Messaging API.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ivschat-2020-07-14/DisconnectUser>`_  


  **Request Syntax**
  ::

    response = client.disconnect_user(
        roomIdentifier='string',
        userId='string',
        reason='string'
    )
    
  :type roomIdentifier: string
  :param roomIdentifier: **[REQUIRED]** 

    Identifier of the room from which the user's clients should be disconnected. Currently this must be an ARN.

    

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

    ID of the user (connection) to disconnect from the room.

    

  
  :type reason: string
  :param reason: 

    Reason for disconnecting the user.

    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`ivschat.Client.exceptions.ThrottlingException`

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

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

  
  *   :py:class:`ivschat.Client.exceptions.PendingVerification`

  
  *   :py:class:`ivschat.Client.exceptions.ValidationException`

  