Spare Token API

The Token API from Spare — 2 operation(s) for token.

Operations 2

GET /api/v1.0/authentication/Token Generates an API authentication token using the provided API credentials.
GET /api/v1.0/authentication/Refresh Refreshes an API authentication token using a valid refresh token.

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/spare-token-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

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

OpenAPI Specification

spare-token-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Information Account Token API
  description: Spare account information API documentation
  termsOfService: https://terms.tryspare.com/en
  contact:
    name: Spare Technologies WLL.
    email: hello@tryspare.com
  license:
    name: Spare Technologies WLL.
  version: '1.0'
servers:
- url: https://ob.tryspare.com/api/v1.0/authentication
  description: Base URL declared by the provider in apis.yml (roadmap#122).
security:
- Bearer: []
tags:
- name: Token
paths:
  /api/v1.0/authentication/Token:
    get:
      tags:
      - Token
      summary: Generates an API authentication token using the provided API credentials.
      description: "**Unique resource name:** api_authentication.v1.token\n            \nThis endpoint authenticates an API keys by validating the provided API credentials.\nUpon successful authentication, an access token is generated and returned.\n            \n**Authentication Process:**\n- The `app-id` and `x-api-key` headers must contain valid credentials.\n- If authentication is successful, a signed JSON Web Token (JWT) is issued.\n- If authentication fails due to invalid credentials, a `401 Unauthorized` response is returned.\n            \n**Security Considerations:**\n- The API key (`x-api-key`) should be kept confidential.\n- The generated JWT should be used for subsequent authenticated requests."
      parameters:
      - name: app-id
        in: header
        description: The unique identifier of the API keys.
        required: true
        schema:
          type: string
      - name: x-api-key
        in: header
        description: The API key associated with the API keys.
        required: true
        schema:
          type: string
      responses:
        '401':
          description: Returned if the API credentials (`app-id` and `x-api-key`) are incorrect or unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Internal Server Error
        '200':
          description: Successfully generated an API authentication token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonWebTokenResponseModel'
  /api/v1.0/authentication/Refresh:
    get:
      tags:
      - Token
      summary: Refreshes an API authentication token using a valid refresh token.
      description: "**Unique resource name:** api_authentication.v1.refresh\n            \nThis endpoint allows clients to obtain a new access token by providing a valid refresh token.\nThe refresh token must be issued by the authentication service and must not be expired.\n            \n**Authentication Process:**\n- The `refresh-token` header must contain a valid refresh token.\n- If the refresh token is valid, a new access token is issued.\n- If the refresh token is invalid or expired, a `401 Unauthorized` response is returned.\n            \n**Security Considerations:**\n- Refresh tokens should be stored securely and not shared."
      parameters:
      - name: refresh-token
        in: header
        description: The refresh token used to obtain a new access token.
        required: true
        schema:
          type: string
      responses:
        '401':
          description: Returned if the refresh token is incorrect, expired, or unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Internal Server Error
        '200':
          description: Successfully generated a new API authentication token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonWebTokenResponseModel'
components:
  schemas:
    JsonWebTokenResponseModel:
      type: object
      properties:
        type:
          type:
          - string
          - 'null'
          readOnly: true
        access_token:
          type:
          - string
          - 'null'
        expires_in:
          type: integer
          format: int32
        refresh_token:
          type:
          - string
          - 'null'
        refresh_expires_in:
          type: integer
          format: int32
      additionalProperties: false
    ProblemDetails:
      type: object
      properties:
        type:
          type:
          - string
          - 'null'
        title:
          type:
          - string
          - 'null'
        status:
          type:
          - integer
          - 'null'
          format: int32
        detail:
          type:
          - string
          - 'null'
        instance:
          type:
          - string
          - 'null'
      additionalProperties: {}
  securitySchemes:
    Bearer:
      type: apiKey
      description: Please enter into field the word 'Bearer' followed by a space and JWT
      name: Authorization
      in: header