Claim Device
Mobile App Integration Guide
Claim Device
Self-registers the Android app as a new device in the panel. This is a public endpoint; no Authorization header is required. The app should call this once after the user scans the QR code shown in the Devices page of the web panel.
After a successful registration, the one-time token is consumed and the same token value becomes the permanent per-device API token. Store it securely on the device.
Request Body
| Field | Type | Description | |
|---|---|---|---|
| token | string | required | One-time registration token shown in the QR code (uppercase). |
| phone_number | string | optional | SIM 1 phone number. |
| phone_number2 | string | optional | SIM 2 phone number (dual-SIM devices). |
| is_dual_sim | boolean | optional | true / false - whether the device has two SIM slots. |
| fcm_token | string | optional | Firebase Cloud Messaging token for push notifications. |
| name | string | optional | Friendly device name. Defaults to the phone number if omitted. |
Example Request
cURL
curl -X POST "https://api.rcszilla.com/?endpoint=claim_device" \
-H "Content-Type: application/json" \
-d '{
"token": "ABCD-1234-EFGH-5678",
"phone_number": "+40712345678",
"is_dual_sim": false,
"fcm_token": "eXample_FCM_token_here",
"name": "My Pixel 7"
}'
Response
{
"success": true,
"message": "Device registered",
"device_id": 7
}
{
"success": true,
"message": "Already registered",
"device_id": 7
}
{
"success": false,
"message": "Invalid or expired registration token"
}