For AI agents: the documentation index is at /llms.txt, and this page is available as Markdown at /api/auth/oauth-consent.md.

Record a consent decision

Organization tokenNo token

POST
/oauth/consent

The signed-in user's answer to the consent screen. Approving records the grant and mints an authorization code; denying returns the client to its redirect with error=access_denied.

The authorize parameters are repeated here and validated again, because nothing but the user's browser carries them between the two requests.

Returns where the browser should go rather than redirecting, since the consent screen issues this as a fetch.

Rate limit: counts against the Keys and credentials limit, 10 a minute and 50 a day (user token, per user); 100 a minute and 500 a day (organization api key, per organization). See Rate limits.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

An access token from POST /api-key/token. An organization token lasts one hour and has no refresh token; a personal token can be refreshed.

Request Body

application/json
  1. body
approved?boolean

False returns the client to its redirect with access_denied.

client_id*string
redirect_uri*string
Formaturi
response_type*"code"
Value in"code"
scope?string
state?string
code_challenge*string
code_challenge_method*"S256"
Value in"S256"
resource*string
Formaturi

Response Body

Decision recorded

application/json
  1. response
redirect_to*string

Where the browser should go next, approved or denied.

Formaturi
Example Request
curl -X POST 'https://api.truemarkets.co/v1/auth/oauth/consent' \  -H 'Content-Type: application/json' \  -d '{  "client_id": "string",  "redirect_uri": "http://example.com",  "response_type": "code",  "code_challenge": "string",  "code_challenge_method": "S256",  "resource": "http://example.com"}'
Example Response
{  "redirect_to": "http://example.com"}