Skip to content

Latest commit

 

History

History
32 lines (27 loc) · 3.23 KB

File metadata and controls

32 lines (27 loc) · 3.23 KB

PostOAuthAuthorizationRequest

Example Usage

import { PostOAuthAuthorizationRequest } from "@midday-ai/sdk/models/operations";

let value: PostOAuthAuthorizationRequest = {
  clientId: "mid_client_abcdef123456789",
  decision: "allow",
  scopes: [
    "transactions.read",
    "invoices.read",
  ],
  redirectUri: "https://myapp.com/callback",
  state: "abc123xyz789_secure-random-state-value",
  codeChallenge: "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM",
  teamId: "123e4567-e89b-12d3-a456-426614174000",
};

Fields

Field Type Required Description Example
clientId string ✔️ Client ID of the OAuth application mid_client_abcdef123456789
decision operations.Decision ✔️ User's authorization decision allow
scopes operations.Scope[] ✔️ Scopes the user has approved [
"transactions.read",
"invoices.read"
]
redirectUri string ✔️ Redirect URI for OAuth callback https://myapp.com/callback
state string Opaque state parameter for CSRF protection abc123xyz789_secure-random-state-value
codeChallenge string Code challenge for PKCE (S256 method assumed) E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM
teamId string ✔️ Team ID to authorize the application for 123e4567-e89b-12d3-a456-426614174000