# Read the connected device

Source: https://docs.vlayers.ai/reference/connect/get-connected-device

`GET /v1/connect/devices/me` · scope `device:worker`

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.

## Request

cURL:

```bash
curl https://api.vlayers.ai/v1/connect/devices/me \
  -H "Authorization: Bearer $VOICELAYER_API_KEY"
```

TypeScript:

```ts
import { VoiceLayer } from '@voicelayer/api';

const voicelayer = new VoiceLayer();

const { deviceId } = await voicelayer.connect.getConnectedDevice();
console.log(deviceId);
```

Python:

```python
from voicelayer import VoiceLayer

vl = VoiceLayer()

result = vl.connect.get_connected_device()
print(result.device_id)
```

## Response `200`

```json
{
  "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"
}
```
