Authorization Code Credentials Token Request

The client credentials in addition to the authorization code received earlier are used to get access and refresh tokens. The credentials of the client application that are verified by the authorization server. The value of the grant_type is 'authorization_code'.

GovernmentPostal ServiceShippingLogisticsAddress ValidationPackage Tracking

Properties

Name Type Description
grant_type string The OAuth standard flow being requested by the client application.
scope string The OAuth2 scope being requested. A client application may request a subset of scope that has already been configured during registration. The default scope registered for the client application is us
client_id string The unique identifier issued to the client application making the request. Used for authenticating the client application. You will need to add an app to get a client Id and secret. These are the Cons
client_secret string The shared secret issued to the client application making the request. Used for authenticating the client application. You will need to add an app to get a client Id and secret. These are the Consumer
redirect_uri string The authorization code redirect Uniform Resource Identifier (URI) for the third-party application to receive the authorization code. This is used to verify the identify of the requester. The request w
code string The authorization code previously received by the client application.
View JSON Schema on GitHub

JSON Schema

usps-authorization-code-credentials-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/usps/json-schema/usps-authorization-code-credentials-schema.json",
  "title": "Authorization Code Credentials Token Request",
  "description": "The client credentials in addition to the authorization code received earlier are used to get access and refresh tokens. The credentials of the client application that are verified by the authorization server. The value of the grant_type is 'authorization_code'.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/usps-oauth-openapi.yml#/components/schemas/AuthorizationCodeCredentials",
  "required": [
    "code",
    "redirect_uri"
  ],
  "allOf": [
    {
      "$ref": "#/$defs/ClientCredentials"
    },
    {
      "type": "object",
      "properties": {
        "redirect_uri": {
          "description": "The authorization code redirect Uniform Resource Identifier (URI) for the third-party application to receive the authorization code. This is used to verify the identify of the requester. The request will not be redirected to this URI.\n",
          "type": "string"
        },
        "code": {
          "description": "The authorization code previously received by the client application.",
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  ],
  "additionalProperties": false,
  "$defs": {
    "AuthorizationCodeCredentials": {
      "title": "Authorization Code Credentials Token Request",
      "description": "The client credentials in addition to the authorization code received earlier are used to get access and refresh tokens. The credentials of the client application that are verified by the authorization server. The value of the grant_type is 'authorization_code'.",
      "required": [
        "code",
        "redirect_uri"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/ClientCredentials"
        },
        {
          "type": "object",
          "properties": {
            "redirect_uri": {
              "description": "The authorization code redirect Uniform Resource Identifier (URI) for the third-party application to receive the authorization code. This is used to verify the identify of the requester. The request will not be redirected to this URI.\n",
              "type": "string"
            },
            "code": {
              "description": "The authorization code previously received by the client application.",
              "type": "string"
            }
          },
          "additionalProperties": false
        }
      ],
      "additionalProperties": false
    },
    "ClientCredentials": {
      "title": "Client Credentials Token Request",
      "description": "The client credentials are used to get an access token. The credentials of the client application that are verified by the authorization server. The value of the grant_type is 'client_credentials'",
      "required": [
        "client_id",
        "client_secret"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/TokenRequest"
        },
        {
          "type": "object",
          "properties": {
            "client_id": {
              "description": "The unique identifier issued to the client application making the request. Used for authenticating the client application.\n\nYou will need to add an app to get a client Id and secret. These are the Consumer Key and Consumer Secret values respectfully in the API developer portal.\n",
              "type": "string"
            },
            "client_secret": {
              "description": "The shared secret issued to the client application making the request. Used for authenticating the client application.\n\nYou will need to add an app to get a client Id and secret. These are the Consumer Key and Consumer Secret values respectfully in the API developer portal.\n",
              "type": "string"
            }
          },
          "additionalProperties": false
        }
      ],
      "additionalProperties": false
    },
    "RefreshTokenCredentials": {
      "title": "Refresh Token Credentials Request",
      "description": "The client credentials in addition to the refresh token received earlier are used to get access and refresh tokens. The credentials of the client application that are verified by the authorization server. The value of the grant_type is 'refresh_token'.",
      "required": [
        "refresh_token"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/ClientCredentials"
        },
        {
          "type": "object",
          "properties": {
            "refresh_token": {
              "description": "The refresh token value to be used to issue a new access token.",
              "type": "string"
            }
          },
          "additionalProperties": false
        }
      ],
      "additionalProperties": false
    },
    "TokenRequest": {
      "title": "Token Request",
      "description": "The base object for an OAuth token request, in accordance with OAuth industry standards.",
      "type": "object",
      "required": [
        "grant_type"
      ],
      "oneOf": [
        {
          "$ref": "#/$defs/AuthorizationCodeCredentials"
        },
        {
          "$ref": "#/$defs/ClientCredentials"
        },
        {
          "$ref": "#/$defs/RefreshTokenCredentials"
        }
      ],
      "properties": {
        "grant_type": {
          "description": "The OAuth standard flow being requested by the client application.",
          "type": "string",
          "enum": [
            "client_credentials",
            "refresh_token",
            "authorization_code"
          ]
        },
        "scope": {
          "description": "The OAuth2 scope being requested. A client application may request a subset of scope that has already been configured during registration.\n\nThe default scope registered for the client application is used as default when the scope is omitted.\n\n**Only specify the scope in the request when the client application requires less scope, i.e. less access to APIs, than the default.**\n",
          "type": "string",
          "default": ""
        }
      },
      "additionalProperties": true
    }
  }
}

Work with this as data

Every JSON Schema 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 schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • 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 JSON Schema
curl "https://apis.io/api/v1/json-schemas/usps-authorization-code-credentials"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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.