Traccar Session API

User session management

GitHub OpenAPI

Operations 8

GET /session Fetch Session information #
POST /session Create a new Session #
DELETE /session Close the Session #
GET /session/{id} Open a Session as another User #
POST /session/token Generate Session Token #
POST /session/token/revoke Revoke Session Token #
GET /session/openid/auth Begin OpenID Connect authentication #
GET /session/openid/callback OpenID Callback #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/traccar:traccar-session-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

traccar-session-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Traccar Session API
  description: Traccar GPS tracking server API documentation. To use the API you need to have a server instance. For testing purposes you can use one of free demo servers. For production use you can install your own server or get a subscription service.
  contact:
    name: Traccar Support
    url: https://www.traccar.org/
    email: support@traccar.org
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 6.17.0
servers:
- url: https://demo.traccar.org/api
  description: Demo Server 1
- url: https://demo2.traccar.org/api
  description: Demo Server 2
- url: https://demo3.traccar.org/api
  description: Demo Server 3
- url: https://demo4.traccar.org/api
  description: Demo Server 4
- url: https://server.traccar.org/api
  description: Subscription Server
- url: http://{host}:{port}/api
  description: Other Server
  variables:
    host:
      default: localhost
    port:
      enum:
      - '8082'
      - '80'
      default: '8082'
security:
- BasicAuth: []
- ApiKey: []
tags:
- name: Session
  description: User session management
paths:
  /session:
    get:
      operationId: getSession
      summary: Fetch Session information
      tags:
      - Session
      security: []
      parameters:
      - name: token
        in: query
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '404':
          description: Not found
          content: {}
    post:
      operationId: postSession
      summary: Create a new Session
      tags:
      - Session
      security: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - email
              - password
              properties:
                email:
                  type: string
                password:
                  type: string
                  format: password
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '401':
          description: Unauthorized
          content: {}
    delete:
      operationId: deleteSession
      summary: Close the Session
      tags:
      - Session
      responses:
        '204':
          description: No Content
          content: {}
        '401':
          description: Unauthorized
          content: {}
  /session/{id}:
    get:
      operationId: getSessionId
      summary: Open a Session as another User
      description: Admin or manager only. Establishes a session impersonating the specified user.
      tags:
      - Session
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '401':
          description: Unauthorized
          content: {}
        '404':
          description: Not found
          content: {}
  /session/token:
    post:
      operationId: postSessionToken
      summary: Generate Session Token
      tags:
      - Session
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                expiration:
                  type: string
                  format: date-time
        required: false
      responses:
        '200':
          description: Token string
          content:
            text/plain:
              schema:
                type: string
        '401':
          description: Unauthorized
          content: {}
        '400':
          description: Bad request
          content: {}
  /session/token/revoke:
    post:
      operationId: postSessionTokenRevoke
      summary: Revoke Session Token
      tags:
      - Session
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - token
              properties:
                token:
                  type: string
        required: true
      responses:
        '204':
          description: No Content
          content: {}
        '400':
          description: Bad request
          content: {}
  /session/openid/auth:
    get:
      operationId: getSessionOpenidAuth
      summary: Begin OpenID Connect authentication
      tags:
      - Session
      responses:
        '303':
          description: Redirect to OpenID Connect identity provider
          content: {}
        '400':
          description: OpenID Connect is not configured
          content: {}
        default:
          description: Unexpected error
          content: {}
  /session/openid/callback:
    get:
      operationId: getSessionOpenidCallback
      summary: OpenID Callback
      tags:
      - Session
      responses:
        '303':
          description: Successful authentication, redirect to homepage
          content: {}
        '400':
          description: Invalid or expired callback parameters
          content: {}
        default:
          description: Unexpected error
          content: {}
components:
  schemas:
    User:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: Unique user identifier
        name:
          type: string
          description: User display name
        email:
          type: string
          description: Email address used for login and notifications
        phone:
          type:
          - string
          - 'null'
          description: Contact phone number for alerts
        readonly:
          type: boolean
          description: When true, the user cannot change settings
        administrator:
          type: boolean
          description: Grants full administrative privileges when enabled
        map:
          type:
          - string
          - 'null'
          description: Preferred default map layer for the user
        latitude:
          type: number
          description: Default map center latitude for this user
        longitude:
          type: number
          description: Default map center longitude for this user
        zoom:
          type: integer
          description: Default map zoom level on login
        password:
          type: string
          description: Password for user authentication
        coordinateFormat:
          type:
          - string
          - 'null'
          description: Preferred coordinate display format
        disabled:
          type: boolean
          description: Indicates whether the user account is disabled
        expirationTime:
          type:
          - string
          - 'null'
          description: in ISO 8601 format. eg. `1963-11-22T18:30:00Z`
          format: date-time
        deviceLimit:
          type: integer
          description: Maximum number of devices the user can manage
        userLimit:
          type: integer
          description: Maximum number of subordinate users
        deviceReadonly:
          type: boolean
          description: Restricts user from modifying device attributes
        limitCommands:
          type: boolean
          description: Prevents user from sending unsupported commands
        fixedEmail:
          type: boolean
          description: Locks the email field to avoid changes
        poiLayer:
          type:
          - string
          - 'null'
          description: External POI layer configured for the user
        attributes:
          type: object
          description: Additional custom user attributes
          properties: {}
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
    ApiKey:
      type: http
      scheme: bearer