POST/oauth/token

Exchange a client credential for a short-lived access token

The approved contract does not provide a longer purpose statement for this operation.

App
Vision Core
Contract
Platform API 1.0.0-preview.2
Lifecycle
preview
Runtime
acceptance-gated
Operation ID
exchangeClientCredentials
Canonical origin
https://vision.ivisionstudios.com

Purpose and use cases

Exchange a client credential for a short-lived access token

The owning App is Vision Core. Vision owns machine identity and common API policy. Source Apps retain their resource and business authority.

Business use cases and out-of-scope behavior are not yet declared in the approved OpenAPI description.

Request

POST https://vision.ivisionstudios.com/oauth/token

Authentication and authorization

No authentication requirement is declared for this operation.

Headers

  • Accept: application/json — recommended where a JSON response is declared.
  • Content-Type: application/x-www-form-urlencoded — required for the documented request representation.

Undeclared tracing, idempotency, conditional-request, and version headers are not assumed on this page.

Path and query parameters

This operation declares no path or query parameters.

Request body

Media type: application/x-www-form-urlencoded. The body is required.

FieldTypeRulesDescription
grant_type"client_credentials"requiredNot described in the contract.
client_idstringoptionalNot described in the contract.
client_secretstring · passwordoptional; write onlyNot described in the contract.
scopestringoptionalNot described in the contract.

Runnable examples

cURL
curl 'https://vision.ivisionstudios.com/oauth/token' \
  --request POST \
  --header 'accept: application/json' \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data-urlencode 'grant_type=client_credentials' \
  --data-urlencode 'client_id=<client_id>' \
  --data-urlencode 'client_secret=<client_secret>' \
  --data-urlencode 'scope=<scope>'
JavaScript (server-side)
const response = await fetch('https://vision.ivisionstudios.com/oauth/token', {
  method: 'POST',
  headers: {
    accept: 'application/json',
    'content-type': 'application/x-www-form-urlencoded',
  },
  body: new URLSearchParams({
  "grant_type": "client_credentials",
  "client_id": "<client_id>",
  "client_secret": "<client_secret>",
  "scope": "<scope>"
}),
}

if (!response.ok) throw new Error(`Vision API ${response.status}`)
const result = await response.json()
Python 3 standard library
import json
import urllib.parse
import urllib.request

request = urllib.request.Request(
    'https://vision.ivisionstudios.com/oauth/token',
    data=urllib.parse.urlencode({"grant_type":"client_credentials","client_id":"<client_id>","client_secret":"<client_secret>","scope":"<scope>"}).encode(),
    headers={
    "Accept": "application/json",
    "Content-Type": "application/x-www-form-urlencoded"
},
    method='POST',
)
with urllib.request.urlopen(request, timeout=30) as response:
    result = json.load(response)

The current TypeScript reference client covers Platform token exchange and core reads. No native SDK helper is declared for this operation; use the HTTP contract directly and follow the SDK guidance.

Responses

StatusMeaningSchema
200Short-lived bearer tokenobject
400OAuth token endpoint errorobject
401OAuth token endpoint errorobject
429OAuth token endpoint errorobject
503OAuth token endpoint errorobject

Success response schema

FieldTypeRulesDescription
access_tokenstringrequiredNot described in the contract.
token_type"Bearer"requiredNot described in the contract.
expires_inintegerrequired; minimum 60; maximum 300Not described in the contract.
scopestringrequiredNot described in the contract.
200 illustrative response
{
  "access_token": "<access_token>",
  "token_type": "Bearer",
  "expires_in": 60,
  "scope": "<scope>"
}

Errors and troubleshooting

Error bodies and codes are shown only where the approved contract declares them. Use status, the declared error schema, and any correlation identifier returned by the App; do not infer that two Apps share one envelope.

  • 400 OAuth token endpoint error
  • 401 OAuth token endpoint error
  • 429 OAuth token endpoint error
  • 503 OAuth token endpoint error

Collection behavior

Pagination: not declared. Filtering/search: not declared. Sorting: not declared.

Cursor lifetime, cursor binding, stable ordering, maximum traversal, and unknown-filter behavior are not assumed unless stated by a parameter description or schema constraint above.

Operational behavior

  • Rate limit: The operation declares 429, but the numeric policy is not in OpenAPI.
  • Retry: Retry only when the documented error model or response headers authorize it. Timeout and backoff values are not declared by this operation.
  • Idempotency: No idempotency header or replay window is declared.
  • Concurrency: No ETag, If-Match, or optimistic-version header is declared.

Security and privacy

  • Keep client credentials and bearer tokens on trusted servers.
  • Send only to the exact approved HTTPS origin and audience.
  • Treat response data according to the owning App's classification and retention policy; the OpenAPI contract does not itself grant data access.
  • Do not log credentials, tokens, complete private payloads, or secrets.

Edge cases and known documentation gaps

  • No detailed operation description.
  • The request body has no purpose or conditional-rule description.
  • Business roles, timeout, retry budget, rate value, idempotency window, and concurrency behavior are absent unless explicitly stated above.

No related operation is identified by the contract tags.

Contract history and evidence

  • Contract version: 1.0.0-preview.2
  • Approved snapshot SHA-256: 24a5c91187ba12199acfa8aeafdbd2f9c6cbe6e0c72d03f3eeb1850d4f67efac
  • Approval: Anthony, 2026-08-20T14:18:46.997Z (contract-unification-20260820)
  • Download the authoritative OpenAPI 3.1 snapshot