POST /devices/me/login

Generate QR code for WhatsApp login. Scan with WhatsApp app.

Responses

  • 200 application/json

    QR code generated successfully

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • data object
      Hide data attributes Show data attributes object
      • qr_code string
      • timeout integer
  • 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
POST /devices/me/login
curl \
 --request POST 'http://localhost:7001/devices/me/login' \
 --header "Authorization: $API_KEY"
Response examples (200)
{
  "code": 200,
  "data": {
    "qr_code": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
    "timeout": 60
  },
  "status": true,
  "message": "QR code generated successfully"
}
Response examples (200)
{
  "status": true,
  "code": 200,
  "message": "QR code generated successfully",
  "data": {
    "qr_code": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
    "timeout": 60
  }
}
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 generate QR code",
  "status": false,
  "message": "Internal server error"
}
Response examples (500)
{
  "status": false,
  "code": 400,
  "message": "Bad request",
  "error": "Bad request"
}