oauth

Embed
Preview of the card
<a href="https://lucidace.com/docs/ref-oauth"><img src="https://lucidace.com/docs/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/da916cd3-c0fc-4b63-b971-b3c13623daf3/pages/8adc433f-9c73-4c53-89a3-5483ef4cb94a/social-card.svg?v=3e7ae33eec8b" alt="oauth" width="600" height="315"></a>
GEThttps://lucidace.com/.well-known/oauth-authorization-server

Code samples

cURL
curl -X GET "https://lucidace.com/.well-known/oauth-authorization-server"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 RFC 8414 authorization server metadata
GEThttps://lucidace.com/.well-known/oauth-protected-resource

Code samples

cURL
curl -X GET "https://lucidace.com/.well-known/oauth-protected-resource"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 RFC 9728 protected resource metadata
GEThttps://lucidace.com/v1/me/oauth-apps

Code samples

cURL
curl -X GET "https://lucidace.com/v1/me/oauth-apps"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 apps holding live tokens, per project
Example
[
  {
    "app_id": "string",
    "authorized_at": "2024-01-01T00:00:00Z",
    "name": "string",
    "project_id": "string",
    "scopes": [
      "string"
    ]
  }
]
Schema
app_idstringrequired
authorized_atstringrequired
namestringrequired
project_idstringrequired
scopesstring[]required
DELETEhttps://lucidace.com/v1/me/oauth-apps/{app_id}

Parameters

app_idstringpathrequired

Code samples

cURL
curl -X DELETE "https://lucidace.com/v1/me/oauth-apps/{app_id}"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

204 every token the user granted the app is revoked
404
GEThttps://lucidace.com/v1/oauth/authorize

Parameters

response_typestringpathrequired
client_idstringpathrequired
redirect_uristringpathrequired
scopestringpathrequired
Space-separated scopes; empty asks for every scope the app is registered with.
statestringpathrequired
code_challengestringpathrequired
code_challenge_methodstringpathrequired

Code samples

cURL
curl -X GET "https://lucidace.com/v1/oauth/authorize"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 what the consent screen shows
Example
{
  "app_name": "string",
  "client_id": "string",
  "redirect_uri": "string",
  "scopes": [
    "string"
  ],
  "verified": true
}
Schema
app_namestringrequired
client_idstringrequired
redirect_uristringrequired
scopesstring[]required
verifiedbooleanrequired
Registered by an org admin. Dynamically registered and metadata-document clients are not: the consent screen warns and shows the redirect host.
400
401
POSThttps://lucidace.com/v1/oauth/authorize

Request body

application/json
client_idstringrequired
code_challengestringrequired
code_challenge_methodstringrequired
redirect_uristringrequired
response_typestringrequired
scopestring
Space-separated scopes; empty asks for every scope the app is registered with.
statestring
approvebooleanrequired
granted_scopesarray
The scopes the user kept (optional scopes, LC-SEC-27): a non-empty subset of the request. Omitted grants everything requested.
project_idstringrequired
The project the token will be bound to; the user must be able to see it.
{
  "client_id": "string",
  "code_challenge": "string",
  "code_challenge_method": "string",
  "redirect_uri": "string",
  "response_type": "string",
  "scope": "string",
  "state": "string",
  "approve": true,
  "granted_scopes": [
    "string"
  ],
  "project_id": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/oauth/authorize" \
  -H "Content-Type: application/json" \
  -d '{"client_id":"string","code_challenge":"string","code_challenge_method":"string","redirect_uri":"string","response_type":"string","scope":"string","state":"string","approve":true,"granted_scopes":["string"],"project_id":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "redirect_to": "string"
}
Schema
redirect_tostringrequired
Send the browser here: redirect_uri?code=...&state=... or ?error=access_denied.
400
401
404 project not visible
GEThttps://lucidace.com/v1/oauth/device

Parameters

user_codestringpathrequired

Code samples

cURL
curl -X GET "https://lucidace.com/v1/oauth/device"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "app_name": "string",
  "client_id": "string",
  "expires_in": 0,
  "scopes": [
    "string"
  ],
  "user_code": "string",
  "verified": true
}
Schema
app_namestringrequired
client_idstringrequired
expires_inintegerrequired
scopesstring[]required
user_codestringrequired
verifiedbooleanrequired
401
404 unknown, expired or decided code
429
POSThttps://lucidace.com/v1/oauth/device

Request body

application/json
approvebooleanrequired
granted_scopesarray
The scopes the user kept: a non-empty subset of those requested. Omitted grants them all.
project_idstring
The project the token will be bound to (required to approve); the user must be able to see it.
user_codestringrequired
{
  "approve": true,
  "granted_scopes": [
    "string"
  ],
  "project_id": "string",
  "user_code": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/oauth/device" \
  -H "Content-Type: application/json" \
  -d '{"approve":true,"granted_scopes":["string"],"project_id":"string","user_code":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "status": "string"
}
Schema
statusstringrequired
approved or denied.
400
401
404 unknown, expired or decided code, or project not visible
429
POSThttps://lucidace.com/v1/oauth/device_authorization

Request body

application/x-www-form-urlencoded

client_id (and client_secret for confidential clients, or HTTP Basic), optional scope

client_idstring
client_secretstring
scopestring
Space-separated scopes; empty asks for every scope the app is registered with.
{
  "client_id": "string",
  "client_secret": "string",
  "scope": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/oauth/device_authorization" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d '{"client_id":"string","client_secret":"string","scope":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "device_code": "string",
  "expires_in": 0,
  "interval": 0,
  "user_code": "string",
  "verification_uri": "string",
  "verification_uri_complete": "string"
}
Schema
device_codestringrequired
Secret: polled with at the token endpoint, never shown to the user.
expires_inintegerrequired
intervalintegerrequired
Minimum seconds between polls.
user_codestringrequired
What the user confirms on the verification page, XXXX-XXXX.
verification_uristringrequired
verification_uri_completestringrequired
The verification page with the user code filled in.
400 RFC 6749 error object: invalid_scope
401 invalid_client
429
POSThttps://lucidace.com/v1/oauth/register

Request body

application/json

RFC 7591 registration request (the fields Lucida uses; others are ignored).

client_namestringrequired
grant_typesstring[]
Only the device grant (urn:ietf:params:oauth:grant-type:device_code) lets redirect_uris be empty: such a client can never start the browser redirect flow.
redirect_urisstring[]
Required unless grant_types is device-only (validate decides).
scopestring
Space-separated; defaults to *:read.
token_endpoint_auth_methodstring
none (public client, the default) or client_secret_basic / client_secret_post.
{
  "client_name": "string",
  "grant_types": [
    "string"
  ],
  "redirect_uris": [
    "string"
  ],
  "scope": "string",
  "token_endpoint_auth_method": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/oauth/register" \
  -H "Content-Type: application/json" \
  -d '{"client_name":"string","grant_types":["string"],"redirect_uris":["string"],"scope":"string","token_endpoint_auth_method":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201
Example
{
  "client_id": "string",
  "client_id_issued_at": 0,
  "client_name": "string",
  "client_secret": "string",
  "grant_types": [
    "string"
  ],
  "redirect_uris": [
    "string"
  ],
  "scope": "string",
  "token_endpoint_auth_method": "string"
}
Schema
client_idstringrequired
client_id_issued_atintegerrequired
client_namestringrequired
client_secretstring
Only for confidential clients; shown once.
grant_typesstring[]required
redirect_urisstring[]required
scopestringrequired
token_endpoint_auth_methodstringrequired
400 RFC 7591 error
429
POSThttps://lucidace.com/v1/oauth/revoke

Request body

application/x-www-form-urlencoded
client_idstring
client_secretstring
tokenstringrequired
{
  "client_id": "string",
  "client_secret": "string",
  "token": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/oauth/revoke" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d '{"client_id":"string","client_secret":"string","token":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 revoked, or the token was unknown (RFC 7009)
401 invalid_client

Updated