Skip to main content

User Logout

The User Logout API is used to log out an user from the TeleCMI WebRTC SDK. Once the user has logged in and has a valid session, you can use this API to terminate the session cleanly from the SDK.

After the user is authenticated and active on a browser SDK, send a POST request to the following base URL to perform logout.

Base URL

Send your POST method request with valid parameters to the following base URL.

https://rest.connle.com/sbc/logout

Required Parameters

These are the required POST method parameters with description:

Parameter NameTypeDescription
agent_idstringAgent ID assigned to the user (e.g., 1001_1111113)
passwordstringAgent's password
domainstringDomain the agent is registered to (e.g., sbcind.telecmi.com)
Note
All the above parameters ares mandatory.

Sample JSON Request

Below is the following sample JSON POST method request

{
"agent_id": "1001_1111113",
"password": "password@123",
"domain": "sbcind.telecmi.com"
}

Sample Response

If the provided information is valid, your web server will get a sample response from TeleCMI Platform as given below

{
"code": 200,
"msg": "Logged out successfully",
"sbc_response": {
"jsonrpc": "2.0",
"result": {},
"id": 1
}
}

Properties

These are the list of properties and its description

PropertyTypeDescription
codenumberHTTP status code (e.g., 200 for success)
msgstringStatus message (e.g., Logged out successfully)
sbc_responseobjectJSON response from the SBC layer

HTTP status codes

TeleCMI API platform represents the following status code to identity the errors.

Status codeStatus TypeDescription
200OKLogout request received and processed
401ErrorInvalid credentials or unauthorized request
404ErrorUser session not found