Get Session
Try it
GET
/v0/config/sessionRetrieve login session information for your current user session.
Authentication
JSON web token (JWT) or API keyBearer token
Response
200The response body contains current session information including tenant details.
application/json- object
tenant_idstring (uuid)requiredtenant_namestringrequiredCurrent user's tenant name
500Request failed.
application/json- objectInformation returned by REST API endpoints on error.
detailsobjectrequiredDetailed error metadata. The contents of this field is determined by `error_code`.error_codestringrequiredError code is a string that specifies this error type.messagestringrequiredHuman-readable error message.
curl -X GET 'https://api.example.com/v0/config/session' \
-H 'Authorization: Bearer YOUR_TOKEN'const response = await fetch('https://api.example.com/v0/config/session', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
});
const data = await response.json();
console.log(data);interface ApiResponse {
// shape your response here
}
const response: Response = await fetch('https://api.example.com/v0/config/session', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
});
const data = (await response.json()) as ApiResponse;
console.log(data);import requests
url = "https://api.example.com/v0/config/session"
headers = {
"Authorization": "Bearer YOUR_TOKEN"
}
response = requests.request("get", url, headers=headers)
print(response.json())package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api.example.com/v0/config/session", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer YOUR_TOKEN")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
out, _ := io.ReadAll(resp.Body)
fmt.Println(string(out))
}