Test credentials and identify the workspace
GET
const url = 'https://optlo.com/api/v1/me';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://optlo.com/api/v1/me \ --header 'Authorization: Bearer <token>'Available to every valid key, including keys without scopes.
Authorizations
Section titled “Authorizations”Response
Section titled “Response”Success
Media typeapplication/json
Show child attributes
workspace
required
Workspace the authenticated API key belongs to.
Show child attributes
id
required
Unique identifier for the workspace.
string
name
required
Workspace’s display name.
string
key
required
API key used to authenticate this request.
Show child attributes
id
required
Unique identifier for the API key.
string
name
required
Name assigned to the API key.
string
scopes
required
Permissions granted to this key. Write scopes do not imply read scopes.
array of string
Example
{ "workspace": { "id": "ws_B8kN4pR6xZ2", "name": "Acme Support" }, "key": { "id": "key_pL6rT3mN9xB2vQ8k_B8kN4pR6xZ2", "name": "Customer onboarding", "scopes": [ "users:read", "users:write", "conversations:write", "messages:write" ] }}