API
Issue an authorization code (JSON variant of consent)
POST
/auth/cli/issue-code
const url = 'https://mw.omazy.ai/api/v1/auth/cli/issue-code';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{}'};
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://mw.omazy.ai/api/v1/auth/cli/issue-code \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{}'JSON-API equivalent of /authorize/consent. Workspace SPAs render their own consent UI and POST here. Caller must be authenticated.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Client_id, code_challenge, code_challenge_method, redirect_uri, state, scope, install_id, install_name
Media typeapplication/json
object
Examplegenerated
{}Responses
Section titled “Responses”{ redirect_url: ‘<redirect_uri>?code=…&state=…’ }
Media typeapplication/json
object
data
error
object
code
string
message
string
meta
object
next_cursor
string
page
integer
per_page
integer
total
integer
success
boolean
Examplegenerated
{ "data": "example", "error": { "code": "example", "message": "example" }, "meta": { "next_cursor": "example", "page": 1, "per_page": 1, "total": 1 }, "success": true}Bad Request
Media typeapplication/json
object
code
string
message
string
Examplegenerated
{ "code": "example", "message": "example"}Unauthorized
Media typeapplication/json
object
code
string
message
string
Examplegenerated
{ "code": "example", "message": "example"}