Read the connected device
GET
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.
apiKeyheader
AuthorizationBearer <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.
The device the access token is, with its line and agent
application/json- response
deviceId*stringThe device id
Format
uuidlineId*stringThe line the device serves
Format
uuidagentId*stringThe agent that answers on the line
Format
uuidconnectorId*stringThe connector the device connects through
Format
uuide164*stringThe line's phone number; empty when the owner chose none
edgeUrl*stringWhere the device connects to serve calls
Format
uriapiUrl*stringThe API base URL
Format
uricurl 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"}