openapi: 3.0.1 info: title: TRONITY Platform Authentication API description: The TRONITY Platform API provides normalized access to connected electric vehicle and fleet telematics across 20-plus OEM brands. It exposes vehicle listings and VIN, vehicle data (odometer, location, bulk last-known state, records, trips), battery state of charge and range, charging status and history, remote commands (start/stop charging, wake-up), and webhook subscriptions. Access is secured with OAuth2; an app authenticates with a client_id and client_secret to obtain a Bearer access token, and each request is constrained by the scopes the vehicle owner has granted. termsOfService: https://www.tronity.io/en/terms contact: name: TRONITY Support url: https://help.tronity.io version: '1.0' servers: - url: https://api.tronity.tech description: TRONITY Platform API tags: - name: Authentication paths: /oauth/authentication: post: operationId: authControllerAuthentication tags: - Authentication summary: Obtain an OAuth2 access token description: Exchanges credentials for a Bearer access token. Apps use grant_type "app" with client_id and client_secret; the authorization-code flow uses grant_type "code" with a code, and tokens may be renewed with grant_type "refresh_token". requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AuthRequest' responses: '200': description: Access token issued. content: application/json: schema: $ref: '#/components/schemas/AuthResponse' '401': description: Invalid credentials. components: schemas: AuthResponse: type: object properties: access_token: type: string token_type: type: string expires_in: type: number refresh_token: type: string AuthRequest: type: object properties: client_id: type: string client_secret: type: string code: type: string refresh_token: type: string grant_type: type: string description: One of "app", "code" or "refresh_token". required: - grant_type securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT description: OAuth2 Bearer access token obtained from POST /oauth/authentication. Available scopes include read_vin, read_vehicle_info, read_odometer, read_charge, read_battery, read_location, write_charge_start_stop and write_wake_up; the effective scope set is constrained by what the vehicle owner has granted.