Read the connected device

GET
/v1/connect/devices/me

Returns the device an access token belongs to, with the line, agent and connector it was set up with and the URLs it connects to. The command line tool calls it once after the person approves the sign-in; a token that is not a connected device's is refused with 403.

Requires an API key with the device:worker scope.

Authorization

apiKey
headerAuthorizationBearer <token>

A secret API key from the dashboard (Developers → API keys): vl_live_…, or vl_test_… for test mode. Each operation says which scope the key needs.

Response Body

The device the access token is, with its line and agent

application/json
  1. response
deviceId*string

The device id

Formatuuid
lineId*string

The line the device serves

Formatuuid
agentId*string

The agent that answers on the line

Formatuuid
connectorId*string

The connector the device connects through

Formatuuid
e164*string

The line's phone number; empty when the owner chose none

edgeUrl*string

Where the device connects to serve calls

Formaturi
apiUrl*string

The API base URL

Formaturi
Example Request
curl https://api.vlayers.ai/v1/connect/devices/me \  -H "Authorization: Bearer $VOICELAYER_API_KEY"
Example Response
{  "deviceId": "0192f5a8-1a2b-7c3d-8e4f-5a6b7c8d9e01",  "lineId": "0192f5a8-1a2b-7c3d-8e4f-5a6b7c8d9e01",  "agentId": "0192f5c2-6f7a-7b9c-8d1e-2f3a4b5c6d78",  "connectorId": "0192f5c3-7a8b-7cad-9e2f-3a4b5c6d7e89",  "e164": "+14155550123",  "edgeUrl": "wss://edge.vlayers.ai/worker",  "apiUrl": "https://api.vlayers.ai"}