NAV
shell php

Initialize

curl "https://$Instance_Gateway/init"
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://$Instance_Gateway/init');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close($ch);

Make sure to replace $Instance_Gateway with your instance gateway URL.
Example.
https://srv123.irsl.io/instance123/Xrh7vHJ6Ge520607f8e59f31dd0b5ge4bcdcdc19ctCfGgQ7oU/init

Response example

{
  "ErrCode": false,
  "Result": "Initializing successfull"
}

OR

{
  "ErrCode": 1,
  "Result": "Initialized"
}

Initialize the WhatsApp instance

HTTP Request
GET https://Instance_Gateway/int

Parameter Required Description
Instance_Gateway Yes Instance gateway URL

Get qr

curl "https://$Instance_Gateway/qr"
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://$Instance_Gateway/qr');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close($ch);

Make sure to replace $Instance_Gateway with your instance gateway URL.
Example.
https://srv123.irsl.io/instance123/Xrh7vHJ6Ge520607f8e59f31dd0b5ge4bcdcdc19ctCfGgQ7oU/qr

Response example

{
  "ErrCode": false,
  "Result": "1@cY5Tv34SUDcED81JxUrt9cS97vO1xuJ0mv5ucovbXU4ZDgnzT7O6sQSFX43ckrwwseH9xHSdYHS6lA==,X3R2DuXiwOFqCFjWXoyEdTc10OJTZ1kOKY8dZK0UNVc=,Hq794zUte8aL9py2K8kNQQ=="
}

OR

{
  "ErrCode": 404,
  "Result": "no qr exist"
}

Get qrcode in string format

HTTP Request
GET https://Instance_Gateway/qr

Parameter Required Description
Instance_Gateway Yes Instance gateway URL

Get qr.png

curl "https://$Instance_Gateway/qr.png"
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://$Instance_Gateway/qr.png');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close($ch);

Make sure to replace $Instance_Gateway with your instance gateway URL.
Example.
https://srv123.irsl.io/instance123/Xrh7vHJ6Ge520607f8e59f31dd0b5ge4bcdcdc19ctCfGgQ7oU/qr.png

Response example

OR

{
  "ErrCode": 404,
  "Result": "no qr exist"
}

Get qrcode in string format

HTTP Request
GET https://Instance_Gateway/qr.png

Parameter Required Description
Instance_Gateway Yes Instance gateway URL

Get qr.png/base64

curl "https://$Instance_Gateway/qr.png/base64"
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://$Instance_Gateway/qr.png/base64');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close($ch);

Make sure to replace $Instance_Gateway with your instance gateway URL.
Example.
https://srv123.irsl.io/instance123/Xrh7vHJ6Ge520607f8e59f31dd0b5ge4bcdcdc19ctCfGgQ7oU/qr.png/base64

Response example

data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAARIAAAESCAYAAAAxN1ojAAAAAklEQVR4AewaftIAAA6bSURBVO3B0Ylc3a5G0elFZ6BABMo/BoECUQy+fi5k2AtV9Wn/9xvj1+8/EBFZOIiILB1ERJYOIiJLBxGRpYOIyNIXf2Ee/HRdyTuYB6+6kol5MOlKJubBpCt5yjyYdCUT82DSldwwD57qSibmwaQrmZgHn9KVTMyDSVeyZR5MupKJefDTdSWvDiIiSwcRkaWDiMjSQURk6SAisvTFpa7ku5kHN8yDLfPghnkw6Uom5sGkK3nKPPikruSVeTAxDyZdyTt0JU+ZBxPz4IZ5MOlKXpkHk67kHbqS72YePHUQEVk6iIgsHURElg4iIksHEZGlL97EPNjqSt6hK9kyD250JRPz4IZ58KoruWEe3DAPJl3Jq67khnkw6UpumAdPdSU3zIN/lXmw1ZVsHURElg4iIksHEZGlg4jI0kFEZOmL/yDz4FO6kol5M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URElr64ZB78q8yDSVfyqiuZmAc3upIbXckr8+AdupKJebBlHky6kol5MOlKtsyDSVdywzz4lK5kYh5sdSUT82BiHky6kqcOIiJLBxGRpYOIyNJBRGTpICKy9Ov3H4iILBxERJYOIiJLBxGRpYOIyNL/AVKelYe9K9EtAAAAAElFTkSuQmCC

OR

{
  "ErrCode": 404,
  "Result": "no qr exist"
}

Get qr image (png) as base64 string

HTTP Request
GET https://Instance_Gateway/qr.png/base64

Parameter Required Description
Instance_Gateway Yes Instance gateway URL

Get Connection status

curl "https://$Instance_Gateway/connection"
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://$Instance_Gateway/connection');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close($ch);

Make sure to replace $Instance_Gateway with your instance gateway URL.
Example.
https://srv123.irsl.io/instance123/Xrh7vHJ6Ge520607f8e59f31dd0b5ge4bcdcdc19ctCfGgQ7oU/connection

Response example

{
    "ErrCode": false,
    "Result":
    {
        "status": "open",
        "WaNumber": "79851277359",
        "profilePictureUrl": "https://pps.whatsapp.net/v/t61.24694-24/144694444_216930380560948_257461914226121786_n.jpg?ccb=11-4&oh=8dc9ee1c97677f14ab623719a110f867&oe=61B66E43"
    }
}

OR

{
    "ErrCode": false,
    "Result":
    {
        "status": "close",
        "profilePictureUrl": ""
    }
}

Get qrcode in string format

HTTP Request
GET https://Instance_Gateway/connection

Parameter Required Description
Instance_Gateway Yes Instance gateway URL

Logout from current session

curl "https://$Instance_Gateway/logOut"
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://$Instance_Gateway/logOut');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close($ch);

Make sure to replace $Instance_Gateway with your instance gateway URL.
Example.
https://srv123.irsl.io/instance123/Xrh7vHJ6Ge520607f8e59f31dd0b5ge4bcdcdc19ctCfGgQ7oU/logOut

Response example

{
    "ErrCode": false,
    "Result": "Logout request sent to WhatsApp"
}

OR

{
    "ErrCode": false,
    "Result": "Logged Out"
}

Get qrcode in string format

HTTP Request
GET https://Instance_Gateway/logOut

Parameter Required Description
Instance_Gateway Yes Instance gateway URL

Errors

The Kittn API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden -- The instance requested is hidden for administrators only.
404 Not Found -- The specified instance could not be found.
405 Method Not Allowed -- You tried to access a instance with an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
410 Gone -- The instance requested has been removed from our servers.
418 I'm a teapot.
429 Too Many Requests -- You're requesting too many instances! Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.