E-File Magic

Authorization & tokens

Get or refresh a token

Exchange an authorization code, rotate a refresh token, or issue a service token using client credentials.

POST
/oauth/token
Authentication
OAuth protocol client authentication
Required scopes
See authentication requirements
Idempotency key
Not required

How to use this endpoint

Each access token is restricted to its selected resource. Confidential Filing API clients use their registered authentication method. Public MCP clients send client_id without a secret, use the exact MCP resource and cannot use client_credentials.

cURL · service token
curl --request POST '<origin from OAuth metadata>/oauth/token' \
  --user '<client_id>:<client_secret>' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'grant_type=client_credentials' \
  --data-urlencode 'scope=<approved scopes>'

Use the exact endpoint URL from your environment's metadata. Confidential client examples use client_secret_basic; public MCP clients use client_id without a secret.