GET /devices/me

Get information about the current device (from JWT token)

Responses

  • 200 application/json

    Device info retrieved successfully

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • data object
      Hide data attributes Show data attributes object
      • device_id string
      • device_name string
      • whatsmeow_jid string
      • status string
      • created_at string
      • last_active string
  • 401 application/json

    Unauthorized

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • error string
  • 500 application/json

    Internal server error

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • error string
GET /devices/me
curl \
 --request GET 'http://localhost:7001/devices/me' \
 --header "Authorization: $API_KEY"
Response examples (200)
{
  "code": 200,
  "data": {
    "status": "connected",
    "device_id": "550e8400-e29b-41d4-a716-446655440000",
    "created_at": "2025-01-01T00:00:00Z",
    "device_name": "Production Phone",
    "last_active": "2025-12-17T10:30:00Z",
    "whatsmeow_jid": "6281234567890@s.whatsapp.net"
  },
  "status": true,
  "message": "Device info retrieved successfully"
}
Response examples (200)
{
  "status": true,
  "code": 200,
  "message": "Device info retrieved successfully",
  "data": {
    "device_id": "550e8400-e29b-41d4-a716-446655440000",
    "device_name": "Production Phone",
    "whatsmeow_jid": "6281234567890@s.whatsapp.net",
    "status": "connected",
    "created_at": "2025-01-01T00:00:00Z",
    "last_active": "2025-12-17T10:30:00Z"
  }
}
Response examples (401)
{
  "code": 401,
  "error": "Invalid or expired JWT token",
  "status": false,
  "message": "Unauthorized"
}
Response examples (401)
{
  "status": false,
  "code": 401,
  "message": "Unauthorized",
  "error": "Invalid or missing authentication"
}
Response examples (500)
{
  "code": 500,
  "error": "Failed to retrieve device info",
  "status": false,
  "message": "Internal server error"
}
Response examples (500)
{
  "status": false,
  "code": 400,
  "message": "Bad request",
  "error": "Bad request"
}