toolbar

Embed
Preview of the card
<a href="https://lucidace.com/docs/ref-toolbar"><img src="https://lucidace.com/docs/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/da916cd3-c0fc-4b63-b971-b3c13623daf3/pages/b8bbe142-0b81-4c35-b11b-c62d9ec293b1/social-card.svg?v=3e7ae33eec8b" alt="toolbar" width="600" height="315"></a>
GEThttps://lucidace.com/v1/projects/{project_id}/toolbar/launch

Bookmarklet / "Launch" target: mints a launch token for the page's origin and redirects to the page with `?__lc_toolbar=<token>`.

Parameters

project_idstringpathrequired
urlstringqueryrequired
absolute page URL on an allowed origin

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/toolbar/launch?url=<url>"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

303 redirect to the page with the launch token
400
403
404
GEThttps://lucidace.com/v1/projects/{project_id}/toolbar/originsScope *:read

Parameters

project_idstringpathrequired

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/toolbar/origins"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "origins": [
    "string"
  ]
}
Schema
originsstring[]required
scheme://host[:port] each, at most 50.
404
PUThttps://lucidace.com/v1/projects/{project_id}/toolbar/originsScope admin

Replace the allowed origins; admins only (an origin here gets CORS and token exchange).

Parameters

project_idstringpathrequired

Request body

application/json

The origins the toolbar may run on.

originsstring[]required
scheme://host[:port] each, at most 50.
{
  "origins": [
    "string"
  ]
}

Code samples

cURL
curl -X PUT "https://lucidace.com/v1/projects/{project_id}/toolbar/origins" \
  -H "Content-Type: application/json" \
  -d '{"origins":["string"]}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

400
403
404
POSThttps://lucidace.com/v1/projects/{project_id}/toolbar/sessionScope *:read

Parameters

project_idstringpathrequired

Request body

application/json
originstringrequired
Origin the toolbar will run on; must be in the project's toolbar_origins.
{
  "origin": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/toolbar/session" \
  -H "Content-Type: application/json" \
  -d '{"origin":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201
Example
{
  "expires_at": "2024-01-01T00:00:00Z",
  "scopes": [
    "string"
  ],
  "token": "string"
}
Schema
expires_atstringrequired
scopesstring[]required
What the toolbar will be allowed to do (view-only for toolbar read).
tokenstringrequired
Value for ?__lc_toolbar=; single use, expires in 10 minutes.
400
403 origin not allowed or no toolbar access
404
POSThttps://lucidace.com/v1/toolbar/exchange

Request body

application/json
originstringrequired
tokenstringrequired
{
  "origin": "string",
  "token": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/toolbar/exchange" \
  -H "Content-Type: application/json" \
  -d '{"origin":"string","token":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "expires_at": "2024-01-01T00:00:00Z",
  "origin": "string",
  "project_id": "string",
  "scopes": [
    "string"
  ],
  "token": "string"
}
Schema
expires_atstringrequired
originstringrequired
project_idstringrequired
scopesstring[]required
tokenstringrequired
403 origin not allowed
404 unknown, used or expired token
Updated