Docs
ExtensionsSessions

API Reference

The session endpoints: heartbeat, close, list, and revoke.

Heartbeat and close are public, using the session token as the credential. Listing and revoking sessions use your Kora API key (Authorization: Bearer <key>). Change the host variable in the playground to point at your own instance.

POST
/sessions/heartbeat

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/sessions/heartbeat" \  -H "Content-Type: application/json" \  -d '{    "token": "string"  }'
{  "token": "string",  "last_seen": "2019-08-24T14:15:22Z",  "expires_at": "2019-08-24T14:15:22Z"}
POST
/sessions/close

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/sessions/close" \  -H "Content-Type: application/json" \  -d '{    "token": "string"  }'
{  "closed": true}
GET
/sessions
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Query Parameters

license?string

Return only seats for this license key.

Response Body

application/json

curl -X GET "https://example.com/sessions"
[  {    "token": "string",    "license": "string",    "product": "string",    "identifier": "string",    "ip": "string",    "agent": "string",    "last_seen": "2019-08-24T14:15:22Z",    "expires_at": "2019-08-24T14:15:22Z"  }]
DELETE
/sessions
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X DELETE "https://example.com/sessions" \  -H "Content-Type: application/json" \  -d '{}'
{  "revoked": true,  "cleared": 0}