oauth

Exchange grant for OAuth2 tokens

Changed on

Token endpoint that dispatches by grant_type: authorization_code, urn:ietf:params:oauth:grant-type:device_code, or refresh_token.

post/oauth/token

Request

  • Base URL
    https://api.smith.langchain.com
  • URL
    https://api.smith.langchain.com/oauth/token
  • Auth
    • API key in header X-API-Key
    • or API key in header X-Tenant-Id
    • or HTTP bearer

Request body multipart/form-data

grant_typestring required

Grant type: authorization_code, urn:ietf:params:oauth:grant-type:device_code, or refresh_token

client_idstring required

OAuth2 client ID

codestring

Authorization code (authorization_code grant)

code_verifierstring

PKCE code verifier (authorization_code grant)

redirect_uristring

Redirect URI (authorization_code grant)

device_codestring

Device code (device_code grant)

refresh_tokenstring

Refresh token (refresh_token grant)

Response

OK

access_tokenstring
expires_ininteger
id_tokenstring
refresh_tokenstring
token_typestring
workspace_idstring

Changes