Otonomo US API

The US API from Otonomo — 2 operation(s) for us.

Documentation

Specifications

Other Resources

OpenAPI Specification

otonomo-us-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Otonomo Fleet EU US API
  version: '1.1'
  description: Connected-vehicle data API for fleets. Reconstructed by API Evangelist from the per-operation OpenAPI 3.1 definitions embedded in the live Otonomo API reference at docs.otonomo.io (ReadMe). US region host api.otonomo.io; EU region host api.eu.otonomo.io.
  x-source: https://docs.otonomo.io/reference
  x-assembled-by: API Evangelist enrichment pipeline
servers:
- url: https://api.otonomo.io
  description: US region
- url: https://api.eu.otonomo.io
  description: EU region
security:
- oauth2: []
tags:
- name: US
paths:
  /v1/oauth/token:
    post:
      summary: Driver Access Token
      description: This token is used to access driver-specific data.
      operationId: driver-access-token
      parameters:
      - name: content-type
        in: header
        description: '`application/x-www-form-urlencoded`'
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - grant_type
              - code
              - redirect_uri
              - client_id
              - client_secret
              properties:
                grant_type:
                  type: string
                  description: '`authorization_code`'
                code:
                  type: integer
                  description: The authorization code obtained from the permissions dialog redirect. See https://otonomo-docs.readme.io/docs/obtaining-driver-consent
                  format: int64
                redirect_uri:
                  type: integer
                  description: The URI a user will be redirected to after authorization.
                  format: int64
                client_id:
                  type: string
                  description: The identification string of the consumer found on developer platform.
                client_secret:
                  type: string
                  description: The client secret (equivalent to a password) of a consumer found on developer platform.
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: "{\n  \"access_token\": \"kUXuQirqMHB8UonUg8ut4reXURDhCuv1UIs0mZdajH1z2HxABDC\",\n  \"token_type\": \"Bearer\",\n  \"expires_in\": 3600,\n  \"refresh_token\": \"kUXuQirqMHB8UonUg8ut4reXURDhCuv1UIs0mZdajH1z2Hx4Hf\"\n}"
              schema:
                type: object
                properties:
                  access_token:
                    type: string
                    example: kUXuQirqMHB8UonUg8ut4reXURDhCuv1UIs0mZdajH1z2HxABDC
                  token_type:
                    type: string
                    example: Bearer
                  expires_in:
                    type: integer
                    example: 3600
                    default: 0
                  refresh_token:
                    type: string
                    example: kUXuQirqMHB8UonUg8ut4reXURDhCuv1UIs0mZdajH1z2Hx4Hf
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Bad Request:
                  value: "{\n  \"error\": \"unsupported_grant_type\"\n}"
                Result:
                  value: "{\n\t\"error_description\": \"Mismatching redirect URI.\",\n\t\"error\": \"invalid_request\"\n}"
              schema:
                oneOf:
                - title: Bad Request
                  type: object
                  properties:
                    error:
                      type: string
                      example: unsupported_grant_type
                - type: object
                  properties:
                    error_description:
                      type: string
                      example: Mismatching redirect URI.
                    error:
                      type: string
                      example: invalid_request
        '401':
          description: '401'
          content:
            application/json:
              examples:
                Result:
                  value: "{\n\t\"error\": \"invalid_client\"\n}"
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: invalid_client
      deprecated: false
      tags:
      - US
      security: []
  /oauth/token/:
    post:
      summary: General Access Token
      description: This token is used to access information pertaining to the entire account
      operationId: general-access-token
      parameters:
      - name: content-type
        in: header
        description: '`application/x-www-form-urlencoded`'
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - client_id
              - client_secret
              - grant_type
              - audience
              properties:
                client_id:
                  type: string
                  description: The identification string of the client found on the developer platform.
                client_secret:
                  type: string
                  description: The client secret (equivalent to a password) found on the developer platform.
                grant_type:
                  type: string
                  description: '`client_credentials`'
                audience:
                  type: string
                  description: https://api.otonomo.io
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: "{\n  \"access_token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6Ik5UTkZORGxHT0VJeE5qZzNNVUkxUmpJMVJUZEJPRE15UlVVM05VTTJOa1ZETjBNNU1URTVOUSJ9.eyJodHRwczovL290b25vbW8uaW8vbmFtZSI6Im90b0FwcHMiLCJodHRwczovL290b25vbW8uaW8vdXNlcl90eXBlIjoidG9ub21vLmlvL3ZlbmRvciI6Im90b0FwcHMiLCJpc3MiOiJodHRwczovL2F1dGgub3Rvbm9tb\",\n  \"expires_in\": 86400,\n  \"token_type\": \"Bearer\"\n}"
              schema:
                type: object
                properties:
                  access_token:
                    type: string
                    example: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6Ik5UTkZORGxHT0VJeE5qZzNNVUkxUmpJMVJUZEJPRE15UlVVM05VTTJOa1ZETjBNNU1URTVOUSJ9.eyJodHRwczovL290b25vbW8uaW8vbmFtZSI6Im90b0FwcHMiLCJodHRwczovL290b25vbW8uaW8vdXNlcl90eXBlIjoidG9ub21vLmlvL3ZlbmRvciI6Im90b0FwcHMiLCJpc3MiOiJodHRwczovL2F1dGgub3Rvbm9tb
                  expires_in:
                    type: integer
                    example: 86400
                    default: 0
                  token_type:
                    type: string
                    example: Bearer
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
      tags:
      - US
      security: []
components:
  securitySchemes:
    oauth2:
      type: oauth2
      description: 'OAuth2 client-credentials. Obtain a Bearer token from POST /v1/oauth/token/ then send it as Authorization: Bearer <token>.'
      flows:
        clientCredentials:
          tokenUrl: https://api.otonomo.io/v1/oauth/token/
          scopes: {}