Users and access

Session

User session management

Fetch Session information

GET
https://demo.traccar.org/api/session

Parameters

tokenstringquery

Response

200OKUser

OK

Response fields application/json
idinteger<int64>

Unique user identifier

namestring

User display name

emailstring

Email address used for login and notifications

phonestring | null

Contact phone number for alerts

readonlyboolean

When true, the user cannot change settings

administratorboolean

Grants full administrative privileges when enabled

mapstring | null

Preferred default map layer for the user

latitudenumber

Default map center latitude for this user

longitudenumber

Default map center longitude for this user

zoominteger

Default map zoom level on login

passwordstring

Password for user authentication

coordinateFormatstring | null

Preferred coordinate display format

disabledboolean

Indicates whether the user account is disabled

expirationTimestring<date-time> | null

in ISO 8601 format. eg. 1963-11-22T18:30:00Z

deviceLimitinteger

Maximum number of devices the user can manage

userLimitinteger

Maximum number of subordinate users

deviceReadonlyboolean

Restricts user from modifying device attributes

limitCommandsboolean

Prevents user from sending unsupported commands

fixedEmailboolean

Locks the email field to avoid changes

poiLayerstring | null

External POI layer configured for the user

attributesobject

Additional custom user attributes

404Not Found

Not found

Create a new Session

POST
https://demo.traccar.org/api/session

Body

application/x-www-form-urlencoded
emailstringrequired
passwordstring<password>required

Response

200OKUser

OK

Response fields application/json
idinteger<int64>

Unique user identifier

namestring

User display name

emailstring

Email address used for login and notifications

phonestring | null

Contact phone number for alerts

readonlyboolean

When true, the user cannot change settings

administratorboolean

Grants full administrative privileges when enabled

mapstring | null

Preferred default map layer for the user

latitudenumber

Default map center latitude for this user

longitudenumber

Default map center longitude for this user

zoominteger

Default map zoom level on login

passwordstring

Password for user authentication

coordinateFormatstring | null

Preferred coordinate display format

disabledboolean

Indicates whether the user account is disabled

expirationTimestring<date-time> | null

in ISO 8601 format. eg. 1963-11-22T18:30:00Z

deviceLimitinteger

Maximum number of devices the user can manage

userLimitinteger

Maximum number of subordinate users

deviceReadonlyboolean

Restricts user from modifying device attributes

limitCommandsboolean

Prevents user from sending unsupported commands

fixedEmailboolean

Locks the email field to avoid changes

poiLayerstring | null

External POI layer configured for the user

attributesobject

Additional custom user attributes

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
https://demo.traccar.org/api/session/{id}

Admin or manager only. Establishes a session impersonating the specified user.

Parameters

idintegerrequiredpath

Response

200OKUser

OK

Response fields application/json
idinteger<int64>

Unique user identifier

namestring

User display name

emailstring

Email address used for login and notifications

phonestring | null

Contact phone number for alerts

readonlyboolean

When true, the user cannot change settings

administratorboolean

Grants full administrative privileges when enabled

mapstring | null

Preferred default map layer for the user

latitudenumber

Default map center latitude for this user

longitudenumber

Default map center longitude for this user

zoominteger

Default map zoom level on login

passwordstring

Password for user authentication

coordinateFormatstring | null

Preferred coordinate display format

disabledboolean

Indicates whether the user account is disabled

expirationTimestring<date-time> | null

in ISO 8601 format. eg. 1963-11-22T18:30:00Z

deviceLimitinteger

Maximum number of devices the user can manage

userLimitinteger

Maximum number of subordinate users

deviceReadonlyboolean

Restricts user from modifying device attributes

limitCommandsboolean

Prevents user from sending unsupported commands

fixedEmailboolean

Locks the email field to avoid changes

poiLayerstring | null

External POI layer configured for the user

attributesobject

Additional custom user attributes

401Unauthorized

Unauthorized

404Not Found

Not found

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

Response fields text/plain
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
tokenstringrequired

Response

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)