List roles for a CLI session
The roles the approval page offers a CLI session in an org, and the one it starts with. Needs a signed-in user session. Each built-in role up to Admin, and each custom role, that you could give a member yourself (what its holder reaches is within what you can do), and always your own role unless it is Owner. defaultRoleId is Member when offered, otherwise your own role.
Required permission
Requires the self.update permission. See Permissions for the roles and API key permissions that include it.
apiKeyAuthorizationBearer <token>OpenRelay API key. Send it as Authorization: Bearer or_… (legacy vl_… keys still work).
orgId*stringThe roles a CLI session in that org can be given
application/json- response
roles*array<>defaultRoleId*stringcurl -X GET 'https://api.openrelay.inc/v1/me/cli-session-roles?orgId=string'{ "roles": [ { "id": "string", "name": "string", "description": "string", "builtin": true } ], "defaultRoleId": "string"}Deny a pending device login (session only) POST
Marks the code denied; the polling CLI gets access_denied and stops. Needs a signed-in dashboard session: a CLI session cannot call this. Irreversible for that code (a fresh `orl auth login` starts a new one).
List your CLI sessions, every org (session only) GET
Lists every orl auth login session you hold across your orgs, with device name, role, creation, last use and expiry. Needs a signed-in user session. Sessions that expired or were revoked are listed too. An API key cannot call this: it cannot enumerate the user sessions that out-rank it.