Skip to main content
GET
/
devices
/
{device_id}
Get Device Info
curl --request GET \
  --url https://api.example.com/devices/{device_id}
{
  "404": {},
  "500": {},
  "code": "<string>",
  "message": "<string>",
  "status": 123,
  "results": {
    "id": "<string>",
    "phone_number": "<string>",
    "display_name": "<string>",
    "state": "<string>",
    "jid": "<string>",
    "created_at": "<string>"
  }
}
Retrieve detailed information about a specific device, including its connection state, phone number, display name, and other metadata.

Endpoint

GET /devices/{device_id}

Authentication

This endpoint requires HTTP Basic Authentication.

Path Parameters

device_id
string
required
Device ID to retrieve information for

Response

code
string
Response code
message
string
Response message
status
integer
HTTP status code
results
object
Device information object

Response Example

{
  "code": "SUCCESS",
  "message": "Device info",
  "status": 200,
  "results": {
    "id": "my-device-id",
    "phone_number": "628123456789",
    "display_name": "John Doe",
    "state": "logged_in",
    "jid": "[email protected]",
    "created_at": "2024-01-01T00:00:00Z"
  }
}

Error Responses

404
object
Device Not Found
500
object
Internal Server Error

Example Request

curl -X GET http://localhost:3000/devices/my-device-id \
  -u username:password

Use Cases

  • Check device connection status before sending messages
  • Monitor device health and availability
  • Retrieve device metadata for display in UI
  • Verify device exists before performing operations

Build docs developers (and LLMs) love