Tackle Authentication API

Operations for API Authentication

OpenAPI Specification

tackle-authentication-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Tackle Authentication API
  description: Authenticated programmatic access to Tackle's webhooks, metering, private offers, and more.
  version: 1.0.0
  contact:
    name: Tackle Support
    email: support@tackle.io
    url: https://tackle.io
servers:
- url: https://api.tackle.io
tags:
- name: Authentication
  description: Operations for API Authentication
paths:
  /v1/authenticate:
    post:
      tags:
      - Authentication
      operationId: v1-get-token
      description: Retrieve an Access Token using your API Credentials
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthenticationRequest'
            examples:
              example:
                value:
                  client_id: demo-wvx5GMNd4tQ6yOCJdYbv0lJCzJZSmJVi
                  client_secret: demo-OrSS6Ybjp97t1DTBHwP7r9DwhhpXKoswWRygthudAtKzholNlJ4SnhfybZGoaV5YXVvWKL6fZtAYDVnnhZQDjIjyABVF8oAyoemUWoeP41wrXa08Ds6DbOBe830SMyYtu4LcdkeEs71qkcRx1rRUdM3gYukBaMbNoHfOz3U50EZgS6Q6sEPL0TWZDQhMr5mAdzaurWPtwFNnMlMIYwyHjIjxB4WdQLNAhoP5Bs7CiqdPZbSaAaVPBNl2zV2HAfdp
                  grant_type: client_credentials
        required: true
      responses:
        '200':
          $ref: '#/components/responses/Authentication_Authentication-200-OK'
        '400':
          $ref: '#/components/responses/400-Bad-Request'
        '403':
          $ref: '#/components/responses/403-Forbidden'
      summary: Retrieve an Access Token
components:
  responses:
    403-Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            forbidden:
              value:
                code: missing_entitlements
                error: Entitlements are missing from AWS. This can be caused by attempting a purchase with a rejected payment method.
                error_type: service_exception
                errors: []
    Authentication_Authentication-200-OK:
      description: Example response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AuthenticationResponse'
          examples:
            example:
              value:
                access_token: eyJhbGciOiJSU0ExXzUdLCJlbmMiOiJBMjU2Q0JDLUhTNTEy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6qKHeRpsNSR1JZFn2nBTgz5VYAt1xEWSM_hj6cMgcpKixdx2D6ay4AioRTtxTzft3DPA.f4bL_fjAwupn-cGpLY2-7DVZ-0YDPsG34xbwIJhetj2
                token_type: bearer
                expires_in: 5400
    400-Bad-Request:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            invalid_fields:
              value:
                code: invalid_fields
                error: Validation Error
                errors:
                - client_id:
                  - Missing data for required field.
      headers: {}
  schemas:
    AuthenticationRequest:
      title: AuthenticationRequest
      type: object
      properties:
        client_id:
          type: string
          description: MTM Client ID
          minLength: 0
        client_secret:
          type: string
          description: MTM Client Secret
          minLength: 0
        grant_type:
          type: string
          default: client_credentials
          description: Client credential grant type
          enum:
          - client_credentials
          example: client_credentials
      required:
      - client_id
      - client_secret
    AuthenticationResponse:
      title: AuthenticationResponse
      type: object
      properties:
        access_token:
          description: JWT
          type: string
        expires_in:
          description: Number of seconds until the token expires
          type: integer
        token_type:
          description: Token type
          type: string
      required:
      - access_token
      - expires_in
      - token_type
    Error:
      title: ErrorResponse
      type: object
      properties:
        code:
          type: string
          description: Error code
          minLength: 0
        error:
          type: string
          description: Error response
          minLength: 0
        errors:
          description: Error details
          type: array
          items: {}
        error_type:
          type: string
          enum:
          - service_exception
          - client_exception
      required:
      - code
      - error
      - errors
  securitySchemes:
    BearerAuth:
      description: The Tackle API requires a JWT for authentication. You can get this by [getting your API credentials](https://developers.tackle.io/docs/how-to-get-an-m2m-client-id-and-secret) from the Tackle Platform then [retrieving your Access Token](https://developers.tackle.io/docs/getting-an-access-token) using our Authentication endpoint.
      type: http
      scheme: bearer
      bearerFormat: JWT
    BasicAuthCallback:
      description: Use `basic` for [basic HTTP authentication](https://en.wikipedia.org/wiki/Basic_access_authentication); this is only used for `callbacks`
      type: http
      scheme: basic
    HeaderApiKeyAuthCallback:
      description: Use `header_api_key` to specify a custom HTTP request header for authentication. Requests from Tackle will use the specified HTTP header for outbound requests to your Webhook URL; this is only used for `callbacks`'
      type: apiKey
      name: subscription-key
      in: header
    Oauth2AuthCallback:
      description: This auth-type is for `oauth2` client credentials flow. We will use the client_id and client_secret to call the token_url to get an access token; this is only used for `callbacks`'
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: /oauth/token
externalDocs:
  description: Tackle Developer Hub and API Documentation
  url: https://developers.tackle.io
x-readme:
  explorer-enabled: false
  proxy-enabled: true
  samples-enabled: true