OIDC Token API

Token endpoint for exchanging authorization codes for tokens.

Operations 1

POST /token Token Endpoint #

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/oidc-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 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

oidc-token-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: OpenID Connect Authentication Token API
  description: OpenID Connect (OIDC) is an identity layer built on top of the OAuth 2.0 protocol. It allows clients to verify the identity of end-users based on the authentication performed by an authorization server, and to obtain basic profile information about the end-user in an interoperable and REST-like manner. This specification covers the core OIDC endpoints including discovery, token, userinfo, and JWKS.
  version: '1.0'
  contact:
    name: OpenID Foundation
    url: https://openid.net/
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://{issuer}
  description: OpenID Connect Provider
  variables:
    issuer:
      default: example.com
      description: The OIDC issuer domain
tags:
- name: Token
  description: Token endpoint for exchanging authorization codes for tokens.
paths:
  /token:
    post:
      operationId: getToken
      summary: Token Endpoint
      description: Exchanges an authorization code, refresh token, or client credentials for an access token and optionally a refresh token and ID token. The token endpoint is used by the client to obtain tokens after receiving an authorization code from the authorization endpoint.
      tags:
      - Token
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - grant_type
              properties:
                grant_type:
                  type: string
                  description: The type of grant being presented.
                  enum:
                  - authorization_code
                  - refresh_token
                  - client_credentials
                code:
                  type: string
                  description: The authorization code received from the authorization endpoint.
                redirect_uri:
                  type: string
                  format: uri
                  description: The redirect URI used in the authorization request.
                client_id:
                  type: string
                  description: The client identifier.
                client_secret:
                  type: string
                  description: The client secret.
                refresh_token:
                  type: string
                  description: The refresh token for obtaining a new access token.
                scope:
                  type: string
                  description: The requested scope.
                code_verifier:
                  type: string
                  description: PKCE code verifier that was used to generate the code challenge.
      responses:
        '200':
          description: Successful token response containing access token and optionally ID token.
          content:
            application/json:
              schema:
                type: object
                required:
                - access_token
                - token_type
                properties:
                  access_token:
                    type: string
                    description: The access token issued by the authorization server.
                  token_type:
                    type: string
                    description: The type of token issued, typically 'Bearer'.
                    enum:
                    - Bearer
                  expires_in:
                    type: integer
                    description: The lifetime in seconds of the access token.
                  refresh_token:
                    type: string
                    description: A refresh token that can be used to obtain new access tokens.
                  id_token:
                    type: string
                    description: A JSON Web Token (JWT) that contains claims about the authentication event and the end-user.
                  scope:
                    type: string
                    description: The scope of the access token.
        '400':
          description: Invalid request, such as an invalid grant or unauthorized client.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                    - invalid_request
                    - invalid_client
                    - invalid_grant
                    - unauthorized_client
                    - unsupported_grant_type
                    - invalid_scope
                  error_description:
                    type: string
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth 2.0 Bearer Token obtained through OIDC authentication.