log out and log in with another account
ART-15513_KNOWLEDGE_NODE-16
following method:\n\n###### Kotlin\n\n###### Java\n\n```\n|  |  |\n| --- | --- |\n| 1 | DevRev.logout(context: Context, deviceId: String) |\n```\n\nThe user is logged out by clearing their credentials, as well as unregistering the device from receiving push notifications, and stopping the session recording.\n\n### Identity model\n\nThe `Identity` class is used to provide user, organization, and account information when identifying users or updating their details. This class is used primarily
Features | DevRev | Docs
ART-16579_KNOWLEDGE_NODE-15
--- |\n| 1 | DevRev.logout(deviceID); |\n```\n\nThe user is logged out by clearing their credentials, as well as unregistering the device from receiving push notifications, and stopping the session recording.\n\nFor example:\n\n```\n|  |  |\n| --- | --- |\n| 1 | // Identify an anonymous user with a user identifier. |\n| 2 | DevRev.identifyAnonymousUser("user@example.org"); |\n| 3 |  |\n| 4 | // Identify an unverified user using their email address as the user identifier. |\n| 5 |
Features | DevRev | Docs
ART-15510_KNOWLEDGE_NODE-8
property cannot be updated.\n\n### Logout\n\nYou can log out the current user by using the following method:\n\n```\n|  |  |\n| --- | --- |\n| 1 | DevRev.logout(deviceID, successCallback, errorCallback) |\n```\n\nThe user will be logged out by clearing their credentials, as well as unregistering the device from receiving push notifications, and stopping the session recording.\n\nPlug support chat\n-----------------\n\nOnce user identification is complete, you can start using the chat
Features | DevRev | Docs
ART-12449_KNOWLEDGE_NODE-12
user by calling the following method:\n\n###### Kotlin\n\n###### Java\n\n[code]\n\n    1| DevRev.logout(context: Context, deviceId: String)  \n    ---|---\n[/code]  \n  \nThe user will be logged out by clearing their credentials, as well as unregistering the device from receiving push notifications, and stopping the session recording.\n\n## PLuG support chat\n\nOnce user identification is complete, you can start using the chat (conversations) dialog supported by our DevRev SDK. To open the chat
Features — DevRev | Docs
ART-12453_KNOWLEDGE_NODE-10
asynchronous. Ensure you wrap them in a `Task` when calling from synchronous contexts.\n\nUse this property to check whether the user is identified in the current session:\n\n[code]\n\n    1| await DevRev.isUserIdentified  \n    ---|---\n[/code]  \n  \n#### Logout\n\nYou can perform a logout of the current user by calling the following method:\n\n[code]\n\n    1| DevRev.logout(deviceID:)  \n    ---|---\n[/code]  \n  \nThe user will be logged out by clearing their credentials, as well as
Features — DevRev | Docs
ART-15515_KNOWLEDGE_NODE-14
wrap them in a `Task` when calling from synchronous contexts.\n\nUse this property to check whether the user is identified in the current session:\n\n```\n|  |  |\n| --- | --- |\n| 1 | DevRev.isUserIdentified |\n```\n\n### Logout\n\nYou can perform a logout of the current user by calling the following method:\n\n```\n|  |  |\n| --- | --- |\n| 1 | DevRev.logout(deviceID:) |\n```\n\nThe user is logged out by clearing their credentials, as well as unregistering the device from receiving push
Features | DevRev | Docs
ART-16579_KNOWLEDGE_NODE-14
Update the user\n\nYou can update the user\xe2\x80\x99s information using the following method:\n\n```\n|  |  |\n| --- | --- |\n| 1 | DevRev.updateUser(identity); |\n```\n\n##### \n\nThe `userID` property cannot be updated.\n\nUse this property to check whether the user is identified in the current session:\n\n```\n|  |  |\n| --- | --- |\n| 1 | DevRev.isUserIdentified; |\n```\n\n#### Logout\n\nYou can perform a logout of the current user by calling the following method:\n\n```\n|  |  |\n| --- |
Features | DevRev | Docs
ART-15507_KNOWLEDGE_NODE-14
the verified identification method:\n\n```\n|  |  |\n| --- | --- |\n| 1 | DevRev.identifyVerifiedUser(userID: string, sessionToken: string) |\n```\n\n### Update the user\n\nYou can update the user\xe2\x80\x99s information using the following method:\n\n```\n|  |  |\n| --- | --- |\n| 1 | DevRev.updateUser(identity: Identity) |\n```\n\n##### \n\nThe `userID` property cannot be updated.\n\n### Logout\n\nYou can logout of the current user by using the following method:\n\n```\n|  |  |\n| --- | ---
Features | DevRev | Docs
ART-15513_KNOWLEDGE_NODE-15
|\n| 1 | DevRev.identifyVerifiedUser(userId: String, sessionToken: String) |\n```\n\n### Updating the user\n\nTo update a user\xe2\x80\x99s information, use the following method:\n\n###### Kotlin\n\n###### Java\n\n```\n|  |  |\n| --- | --- |\n| 1 | DevRev.updateUser( |\n| 2 | identity: Identity |\n| 3 | ) |\n```\n\nThe function accepts the `DevRev.Identity` ojbect.\n\n##### \n\nThe `userID` property cannot be updated.\n\n### Logout\n\nYou can perform a logout of the current user by calling the
Features | DevRev | Docs
ART-12460_KNOWLEDGE_NODE-9
DevRev.identifyVerifiedUser(identity, successCallback, errorCallback)  \n    ---|---\n[/code]  \n  \n### Update the user\n\nYou can update the user\xe2\x80\x99s information using the following method:\n\n[code]\n\n    1| DevRev.updateUser(identity, successCallback, errorCallback)  \n    ---|---\n[/code]  \n  \n#####\n\nThe `userID` property cannot be updated.\n\n### Logout\n\nYou can log out the current user by using the following method:\n\n[code]\n\n    1| DevRev.logout(deviceID,
Features — DevRev | Docs
ART-15507_KNOWLEDGE_NODE-15
|\n| 1 | DevRev.logout(deviceID: string) |\n```\n\n### Identity model\n\nThe `Identity` interface is used to provide user, organization, and account information when identifying users or updating their details. This class is used primarily with the `identifyUnverifiedUser` and `updateUser` methods.\n\n#### Properties\n\nThe `Identity` class contains the following properties:\n\n| Property | Type | Required | Description |\n| --- | --- | --- | --- |\n| `userRef` | `string` | \xe2\x9c\x85 | A
Features | DevRev | Docs
ART-15506_KNOWLEDGE_NODE-27
|\n| 1 | // Delete the existing Plug instance if it exists |\n| 2 | if (window.plugSDK.isPlugInitialized) { |\n| 3 | window.plugSDK.shutdown(); |\n| 4 | } |\n| 5 |  |\n| 6 | // Re-initialize Plug |\n| 7 | window.plugSDK.init({ |\n| 8 | app_id: appId, |\n| 9 |  |\n| 10 | // With session token |\n| 11 | session_token: sessionToken, |\n| 12 |  |\n| 13 | // Or without session token |\n| 14 | identity: {}, |\n| 15 | }); |\n```\n\nIf you\xe2\x80\x99re using the Plug SDK for recording user sessions,
Identify your users with Plug | DevRev | Docs
ART-15506_KNOWLEDGE_NODE-26
relevant user information. Plug can only be initialized once per page load.\n\nIn most cases, this works as expected\xe2\x80\x94user identification typically happens after login or signup, which causes a page reload and clears any previous Plug instance.\n\nHowever, if your application needs to update the user identity without a full page refresh, you need to explicitly delete the existing Plug instance before initializing it again with the new user information.\n\n```\n|  |  |\n| --- | ---
Identify your users with Plug | DevRev | Docs
ART-15509_KNOWLEDGE_NODE-15
prompt to start a conversation with your team.\n\n```\n|  |  |\n| --- | --- |\n| 1 | plugSDK.toggleWidget(true, \'create_conversation\', { |\n| 2 | startConversationContent: \'Hi\', |\n| 3 | }); |\n```\n\nShutdown\n--------\n\nThe `shutdown()` method is used to end the current user session in the Plug widget. It allows you to clear users\xe2\x80\x99 conversations and tickets when they log out of your application.\n\n```\n|  |  |\n| --- | --- |\n| 1 | await window.plugSDK.shutdown();
Methods | DevRev | Docs
ART-1270_KNOWLEDGE_NODE-4
true , 5 } ) ; 6 7 window. plugSDK. onEvent ( ( payload ) => { 8 if ( payload. type === \' ON_PLUG_WIDGET_READY \' ) { 9 window. plugSDK. initSearchAgent () ; 10 } 11 } ) ; 12 } , []) ; Shutdown the widget.\n\nThe shutdown() method is helpful when you want to end the user session which is currently initialized in the PLuG widget. You can use this method to clear your users\xe2\x80\x99 conversations and tickets when they log out of your application.\n\n1 await window. plugSDK. shutdown ()
Methods — DevRev | Docs
ART-2897_KNOWLEDGE_NODE-16
conversation with your team.\n\n[code]\n\n    1| plugSDK.toggleWidget(true, \'create_conversation\', {  \n    ---|---  \n    2| \tstartConversationContent: \'Hi\',  \n    3| });\n[/code]  \n  \n## Shutdown\n\nThe `shutdown()` method is used to end the current user session in the PLuG widget. It allows you to clear users\xe2\x80\x99 conversations and tickets when they log out of your application.\n\n[code]\n\n    1| await window.plugSDK.shutdown();  \n    ---|---\n[/code]  \n  \nAfter calling
Methods — DevRev | Docs
ART-15506_KNOWLEDGE_NODE-29
window.plugSDK.shutdown(); |\n| 6 | } |\n| 7 | window.plugSDK.init({ |\n| 8 | app_id: appId, |\n| 9 |  |\n| 10 | // Pass the session details |\n| 11 | session_recording_options: { |\n| 12 | sessionDetails: { |\n| 13 | sessionId: sessionId, |\n| 14 | tabId: tabId, |\n| 15 | }, |\n| 16 | }, |\n| 17 |  |\n| 18 | // With session token |\n| 19 | session_token: sessionToken, |\n| 20 | // Or without session token |\n| 21 | identity: {}, |\n| 22 | }); |\n```\n\nWas this page
Identify your users with Plug | DevRev | Docs
ART-15506_KNOWLEDGE_NODE-25
8 | }) |\n```\n\n##### \n\nNote that the `updateIdentity` method cannot be used to update the `user_ref` of the user. In order to change the identity of the user completely to a new one, you need to re-initialize Plug. See the [Changing the user identity](/sdks/web/user-identity#changing-the-user-identity) section for more details.\n\nChanging the user identity\n--------------------------\n\nAs described in the above sections, to identify a user, you need to initialize the Plug SDK with the
Identify your users with Plug | DevRev | Docs