Users and access
Session
User session management
Fetch Session information
GET
https://demo.traccar.org/api/session
Parameters
tokenstringqueryResponse
OK
404Not Found
Not found
Create a new Session
POST
https://demo.traccar.org/api/session
Body
application/x-www-form-urlencoded
emailstringrequiredpasswordstring<password>requiredResponse
OK
401Unauthorized
Unauthorized
Close the Session
DELETE
https://demo.traccar.org/api/session
Response
204No Content
No Content
401Unauthorized
Unauthorized
Authorization
BasicAuthhttp (basic)ApiKeyhttp (bearer)Open a Session as another User
GET
Admin or manager only. Establishes a session impersonating the specified user.
Parameters
idintegerrequiredpathResponse
Authorization
BasicAuthhttp (basic)ApiKeyhttp (bearer)Generate Session Token
POST
https://demo.traccar.org/api/session/token
Body
application/x-www-form-urlencoded
expirationstring<date-time>Response
200OKstring
Token string
400Bad Request
Bad request
401Unauthorized
Unauthorized
Authorization
BasicAuthhttp (basic)ApiKeyhttp (bearer)Revoke Session Token
POST
https://demo.traccar.org/api/session/token/revoke
Body
application/x-www-form-urlencoded
tokenstringrequiredResponse
204No Content
No Content
400Bad Request
Bad request
Authorization
BasicAuthhttp (basic)ApiKeyhttp (bearer)Begin OpenID Connect authentication
GET
https://demo.traccar.org/api/session/openid/auth
Response
303See Other
Redirect to OpenID Connect identity provider
400Bad Request
OpenID Connect is not configured
default
Unexpected error
Authorization
BasicAuthhttp (basic)ApiKeyhttp (bearer)OpenID Callback
GET
https://demo.traccar.org/api/session/openid/callback
Response
303See Other
Successful authentication, redirect to homepage
400Bad Request
Invalid or expired callback parameters
default
Unexpected error
Authorization
BasicAuthhttp (basic)ApiKeyhttp (bearer)