Calls the /sso-user/remove-session Chatwee API method. It terminates all backend sessions belonging to the user, identified by the particular user ID.
<?php
require_once(dirname( __FILE__ ) . "/ChatweeV2_SDK/Chatwee.php");
ChatweeV2_Configuration::setApiUrl(YOUR_API_URL);
ChatweeV2_Configuration::setChatId(YOUR_PERSONAL_CHAT_ID);
ChatweeV2_Configuration::setClientKey(YOUR_PERSONAL_CLIENT_KEY);
try {
ChatweeV2_SsoUser::removeSession(Array(
"sessionId" => "3d14222e14addf548a12ffad",
));
echo "The user session has been removed";
} catch(Exception $exception) {
echo "An error occured: " . $exception->getMessage();
}
?>
Name | Description | Type | Mandatory | Remarks |
---|---|---|---|---|
sessionId | ID of the session | string | yes | the value obtained from the ChatweeV2_SsoUser::login method |