Initiate QR code login for a specific device
cURL
curl --request GET \ --url https://api.example.com/devices/{device_id}/login
{ "404": {}, "500": {}, "code": "<string>", "message": "<string>", "results": { "pair_code": "<string>" } }
GET /devices/{device_id}/login
POST /devices/{device_id}/login/code?phone=628912344551
Show example
my-device-id
SUCCESS
QR code generated successfully
Show properties
30
http://localhost:3000/statics/images/qrcode/scan-qr-b0b7bb43-9a22-455a-814f-5a225c743310.png
{ "code": "SUCCESS", "message": "QR code generated successfully", "results": { "qr_duration": 30, "qr_link": "http://localhost:3000/statics/images/qrcode/scan-qr-b0b7bb43-9a22-455a-814f-5a225c743310.png" } }
curl -X GET http://localhost:3000/devices/my-device-id/login \ -u username:password
628912344551
Pairing code generated successfully
ABCD-1234
{ "code": "SUCCESS", "message": "Pairing code generated successfully", "results": { "pair_code": "ABCD-1234" } }
curl -X POST "http://localhost:3000/devices/my-device-id/login/code?phone=628912344551" \ -u username:password
Show response
{ "code": "404", "message": "Device not found", "results": null }
{ "code": "INTERNAL_SERVER_ERROR", "message": "Error initiating login", "results": null }
qr_link
logged_in