Get current session
GET
/v2/portal/auth/session
curl --request GET \ --url https://api.sipstack.com/v2/portal/auth/session \ --header 'Authorization: Bearer <token>'import requests
url = "https://api.sipstack.com/v2/portal/auth/session"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.json())const url = 'https://api.sipstack.com/v2/portal/auth/session';const options = {method: 'GET', 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: 'GET', url: 'https://api.sipstack.com/v2/portal/auth/session', headers: {Authorization: 'Bearer <token>'}};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}Returns the authenticated user with organization context, permissions, and subscribed products.
Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”Current session.
Media type application/json
object
success
boolean
data
object
user
User identity, role, organization, permissions, and product flags.
object
session
object
id
string
Example generated
{ "success": true, "data": { "user": {}, "session": { "id": "example" } }}Not authenticated, token expired, or session invalid.
Media type application/json
Central error-handler shape used by most portal endpoints.
object
statusCode
integer
message
string
code
Machine-readable code, present when one applies. See Error Codes.
string
Example
{ "statusCode": 401, "message": "Token expired", "code": "TOKEN_EXPIRED"}