OAuth

OAuth Token Exchange

Exchange authorization code for access token or refresh an access token. Accepts application/json or application/x-www-form-urlencoded.

post/oauth/token

Request

  • Base URL
    https://api.midday.ai
  • URL
    https://api.midday.ai/oauth/token
  • Auth
    • OAuth 2
      Authorization code: https://app.midday.ai/oauth/authorize
      Token URL: https://api.midday.ai/oauth/token
    • or HTTP bearer

Response

Token exchange successful

access_tokenstring required

Access token for API requests

token_type'Bearer' required

Token type, always 'Bearer'

expires_innumber required

Token expiration time in seconds

refresh_tokenstring required

Refresh token for obtaining new access tokens

scopestring required

Space-separated list of granted scopes

Example response

{
  "access_token": "mid_access_token_abcdef123456789",
  "token_type": "Bearer",
  "expires_in": 3600,
  "refresh_token": "mid_refresh_token_abcdef123456789",
  "scope": "transactions.read invoices.read"
}

Changes

No recorded changes to this operation across all 1 revision of this API.