Approve or deny the `bl login`
const url = 'https://example.com/api/v1/cli/consent';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"user_code":"example","approve":true}'};
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/cli/consent \ --header 'Content-Type: application/json' \ --data '{ "user_code": "example", "approve": true }'The explicit answer on the confirmation page (RFC 8628 §5.4): only this approves a bl login, never the login at the identity provider by itself. Needs the cookie of GET /api/v1/cli/consent, a request from a page of this service (Sec-Fetch-Site: same-origin, or else Origin or Referer), and to approve, the user code the page showed. The login is used once, also when denied.
Authorizations
Section titled “Authorizations”- None
Request Bodyrequired
Section titled “Request Bodyrequired”object
The code the page showed and the user compared with the terminal.
true approves, false denies.
Example generated
{ "user_code": "example", "approve": true}Responses
Section titled “Responses”OK.
object
Example generated
{ "approved": true}The code does not match; nothing approved.
The body of every failed call to a management API.
object
object
Stable, machine-readable: invalid_request, unauthenticated,
forbidden, not_found, conflict, upstream_unavailable,
unavailable, internal, or a more specific code of the operation.
For people; may change between versions.
Example
{ "error": { "code": "not_found", "message": "unknown negotiation" }}From another site.
The body of every failed call to a management API.
object
object
Stable, machine-readable: invalid_request, unauthenticated,
forbidden, not_found, conflict, upstream_unavailable,
unavailable, internal, or a more specific code of the operation.
For people; may change between versions.
Example
{ "error": { "code": "not_found", "message": "unknown negotiation" }}No login waits for confirmation in this browser; it may have expired.
The body of every failed call to a management API.
object
object
Stable, machine-readable: invalid_request, unauthenticated,
forbidden, not_found, conflict, upstream_unavailable,
unavailable, internal, or a more specific code of the operation.
For people; may change between versions.
Example
{ "error": { "code": "not_found", "message": "unknown negotiation" }}