Fence Authentication API

Obtain a bearer access token for a machine-to-machine integration.

Operations 1

POST /v1/login/access-token Obtain an access 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/fence:fence-authentication-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 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. See our Privacy Policy and Terms.

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

OpenAPI Specification

fence-authentication-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Fence Partner Integration Authentication API
  version: '2.0'
  description: Machine-readable contract for the Fence API operations documented for integration partners. Access requires credentials provisioned by Fence during onboarding. Deal-specific asset fields are agreed separately and remain explicitly extensible in this contract. The current public API uses the /v2 major-version path. Compatible additive changes may be introduced within a major version; a change that breaks a documented integration requires a new major version. No operation in this description is currently announced for deprecation.
  contact:
    name: Fence
    url: https://fence.finance/contact/
    email: hello@fence.finance
servers:
- url: https://dev-api.fence.finance
  description: Sandbox API for integration testing. Requires sandbox credentials provisioned by Fence.
- url: https://api.fence.finance
  description: Production API. Requires production credentials provisioned by Fence.
security:
- OAuth2ClientCredentials: []
tags:
- name: Authentication
  description: Obtain a bearer access token for a machine-to-machine integration.
paths:
  /v1/login/access-token:
    post:
      tags:
      - Authentication
      operationId: obtainAccessToken
      summary: Obtain an access token
      description: Exchange a Fence client ID and client secret for a bearer access token using the OAuth 2.0 Client Credentials grant.
      security: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ClientCredentialsTokenRequest'
      responses:
        '200':
          description: Access token issued.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessToken'
        '400':
          description: The request could not be processed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpError'
        '401':
          description: A valid bearer access token is required.
          headers:
            WWW-Authenticate:
              description: Bearer authentication challenge.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpError'
        '422':
          description: The request did not satisfy validation rules.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpError'
components:
  schemas:
    AccessToken:
      type: object
      additionalProperties: false
      required:
      - access_token
      - token_type
      - expires_in
      properties:
        access_token:
          type: string
          minLength: 1
        token_type:
          type: string
          description: Bearer token type.
        expires_in:
          type: integer
          minimum: 1
          description: Lifetime of the access token in seconds.
    ValidationIssue:
      type: object
      additionalProperties: true
      properties:
        loc:
          type: array
          items:
            oneOf:
            - type: string
            - type: integer
        msg:
          type: string
        type:
          type: string
    HttpError:
      type: object
      additionalProperties: true
      required:
      - detail
      properties:
        detail:
          oneOf:
          - type: string
          - type: array
            items:
              $ref: '#/components/schemas/ValidationIssue'
          - type: object
            additionalProperties: true
    ClientCredentialsTokenRequest:
      type: object
      additionalProperties: false
      required:
      - grant_type
      - client_id
      - client_secret
      properties:
        grant_type:
          type: string
          const: client_credentials
        client_id:
          type: string
          minLength: 1
        client_secret:
          type: string
          format: password
          minLength: 1
  securitySchemes:
    OAuth2ClientCredentials:
      type: oauth2
      description: OAuth 2.0 Client Credentials grant for server-to-server integrations. Fence provisions credentials separately for each environment.
      flows:
        clientCredentials:
          tokenUrl: /v1/login/access-token
          scopes: {}
externalDocs:
  description: Fence API Client Integration Guide
  url: https://docs.fence.finance/