Appearance
Devices API 
The Devices API allows you to manage WhatsApp devices connected to your account.
Connect Device 
Connect a WhatsApp device and get a QR code for scanning.
Endpoint 
GET /connect/{device}Path Parameters 
| Parameter | Type | Required | Description | 
|---|---|---|---|
| device | string | Yes | The mobile number of the device | 
Example Request 
bash
curl -X GET \
  https://{subdomain}.whatsgate.net/api/connect/123456789 \
  -H 'Access-Token: your_api_token_here'Example Response 
json
{
  "success": true,
  "qrCode": "data:image/png;base64,..."
}Error Response 
json
{
  "success": false,
  "message": "device not found!"
}Get Device Status 
Get the connection status of a WhatsApp device.
Endpoint 
GET /status/{device}Path Parameters 
| Parameter | Type | Required | Description | 
|---|---|---|---|
| device | string | Yes | The mobile number of the device | 
Example Request 
bash
curl -X GET \
  https://{subdomain}.whatsgate.net/api/status/123456789 \
  -H 'Access-Token: your_api_token_here'Example Response 
json
{
  "success": true,
  "message": "connected"
}INFO
The status can be one of the following:
- "connected"
- "disconnected"
- "not connected"
- "not initialized"
Delete Device 
Delete a WhatsApp device connection.
Endpoint 
POST /deleteRequest Parameters 
| Parameter | Type | Required | Description | 
|---|---|---|---|
| sender_device | string | Yes | The mobile number of the device to delete | 
Example Request 
bash
curl -X POST \
  https://{subdomain}.whatsgate.net/api/delete \
  -H 'Access-Token: your_api_token_here' \
  -H 'Content-Type: application/json' \
  -d '{
    "sender_device": "123456789"
}'Example Response 
json
{
  "success": true,
  "message": "Device deleted successfully"
}Error Response 
json
{
  "success": false,
  "message": "The selected sender device is invalid."
}Error Handling 
If there's an error with your request, you'll receive a response with a success field set to false and a message field describing the error.
Common error messages include:
- "device not found!"
- "device is already connected"
- "The selected sender device is invalid."
