Skip to content
OpenRelay is in early access, and the /v1 API is stable. New capabilities ship in the changelog.
API ReferenceAccount and accessAccount

Look up a pending device login

Shows the approval page what a pending device login is: the requesting device's name, the IP that started the flow and when. User sessions only. Approving or denying a CLI login is something only a signed-in person does, so an API key can never call this. Rate limited per user and per IP, the brute-force mitigation for a guessed 6-digit code.

Required permission

Requires the self.update permission. See Permissions for the roles and API key permissions that include it.

GET
/v1/cli-auth/device/{userCode}

Authorization

apiKey
headerAuthorizationBearer <token>

OpenRelay API key. Send it as Authorization: Bearer or_… (legacy vl_… keys still work).

Path Parameters

userCode*string
Match^[0-9]{6}$

Response Body

The pending code's device details

application/json
  1. response
deviceName*string
clientIp?string
requestedAt*string
Formatdate-time
status*string

pending, approved, or denied.

Example Request
curl -X GET 'https://api.openrelay.inc/v1/cli-auth/device/string'
Example Response
{  "deviceName": "string",  "clientIp": "string",  "requestedAt": "2019-08-24T14:15:22Z",  "status": "string"}