approveOAuthRequest
POST
/api/v1/oauth/approve
const url = 'https://example.com/api/v1/oauth/approve';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"client":"example","redirectUri":"https://example.com","scope":"example","state":"example","challenge":"example","method":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/oauth/approve \ --header 'Content-Type: application/json' \ --data '{ "client": "example", "redirectUri": "https://example.com", "scope": "example", "state": "example", "challenge": "example", "method": "example" }'Browser ceremony: requires an enrolled dashboard session and the X-CSRF-Token header, and refuses bearer grants. Records the grant and returns the validated redirect carrying the single-use authorization code, the state, and iss (RFC 9207): the origin of the approval page as the browser reports it in Origin. A tilecast-ios approval without a usable Origin is refused instead of returning a redirect without iss.
Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters”X-CSRF-Token
string
Cookie-backed browser requests only, and only on unsafe methods. Bearer grants never send it.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
client
required
string
redirectUri
required
string format: uri
scope
required
string
state
string
challenge
required
string
method
S256, or omitted. The Server rejects any other value.
string
Examplegenerated
{ "client": "example", "redirectUri": "https://example.com", "scope": "example", "state": "example", "challenge": "example", "method": "example"}Responses
Section titled “ Responses ”Validated redirect carrying the code
Media typeapplication/json
object
data
required
object
redirectUri
required
string format: uri
Examplegenerated
{ "data": { "redirectUri": "https://example.com" }}Unknown client, redirect, scope, or challenge
Dashboard authentication required
CSRF token required