Skip to content

Retrieve an active API session

Request

Returns details of the user's active API session. The session returned is based on the key used to authenticate the request.

Security
SessionKey(Required scopes: customeradministrator)
curl -i -X GET \
  https://docs.ticketingevents.com/_mock/openapi/sessions/active \
  -H 'X-API-Key: YOUR_API_KEY_HERE'

Responses

The user has an active session, the details of which are in the response body

Bodyapplication/json
selfstring, (uri)

URI of the session resource

idinteger

Unique ID number of the session resource

openboolean

True if the session is currently active, false otherwise

startedstring, (date-time)

Time at which the session was created

keystring

The key associated to this session resource. Include this token in the 'X-API-Key' Header to authenticate requests as the associated user account

accountobject

User account for which the session was opened

Response
{ "self": "/sessions/7c69fb3eeb3c910f049d9d72bec05e0d", "id": 16881177390522, "open": true, "started": "2023-06-30 10:35:39", "key": "7c69fb3eeb3c910f049d9d72bec05e0d", "account": { "self": "/accounts/MO-6A39EE8D", "number": "MO-6A39EE8D", "username": "mothers.milk", "email": "marvin.milk@usmc.gov", "role": "customer", "verified": false, "activated": true, "firstName": "Marvin", "lastName": "Milk", "title": "Mr.", "dateOfBirth": "14-09-1974", "phone": "+1 (268) 555 0123", "country": "Antigua and Barbuda", "firstAddressLine": "Jennings New Extension", "secondAddressLine": "", "city": "Jennings", "state": "Saint Mary's" } }