Logout
POST
/v2/portal/auth/logout
curl --request POST \ --url https://api.sipstack.com/v2/portal/auth/logout \ --header 'Authorization: Bearer <token>'import requests
url = "https://api.sipstack.com/v2/portal/auth/logout"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.json())const url = 'https://api.sipstack.com/v2/portal/auth/logout';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}import axios from 'axios';
const options = { method: 'POST', url: 'https://api.sipstack.com/v2/portal/auth/logout', headers: {Authorization: 'Bearer <token>'}};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}Invalidates the server-side session and clears the auth cookie.
Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”Logged out.
Media type application/json
object
success
boolean
message
string
Example
{ "message": "Logged out successfully"}