Skip to main content
GET
/
devices
List Devices
curl --request GET \
  --url https://api.example.com/devices
{
  "500": {},
  "code": "<string>",
  "message": "<string>",
  "status": 123,
  "results": [
    {
      "id": "<string>",
      "phone_number": "<string>",
      "display_name": "<string>",
      "state": "<string>",
      "jid": "<string>",
      "created_at": "<string>"
    }
  ]
}
Returns all registered devices with their connection status, including device IDs, phone numbers, display names, and login states.

Endpoint

GET /devices

Authentication

This endpoint requires HTTP Basic Authentication.

Response

code
string
Response code
message
string
Response message
status
integer
HTTP status code
results
array
Array of device information objects

Response Example

{
  "code": "SUCCESS",
  "message": "List devices",
  "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"
    },
    {
      "id": "device-2",
      "phone_number": "628987654321",
      "display_name": "Jane Smith",
      "state": "connected",
      "jid": "[email protected]",
      "created_at": "2024-01-02T10:30:00Z"
    }
  ]
}

Error Responses

500
object
Internal Server Error

Example Request

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

Build docs developers (and LLMs) love