x Cheetah tool الدعم
يرجى تسجيل الدخول إلى الموقع وإرسال التذكرة أو يمكنك إرسال رسالتك عن طريق الاتصال بنا




Reseller API

License resellers can easily link their websites to Cheetah-Tool.com through the reseller API interface.

You can connect to our servers through the API and use things like activating Licenses and transfer credit ...

Our PHP class communicates over the HTTPS protocol and uses the GET method to retreive data in the JSON format.




How to Connect the Cheetah To Dhru Fusion



Download API
Download Dhru fusion API



How to Connect the Cheetah To Another Systems


Error codes and messages

Authentication errors

100 Not set Request AND API token!
101 API Token is invalid
102 Not Found request
200 The request has been successfully executed

Activate License errors

600 Active Success
601 You don't have any licenses for this plan
602 Not Found this Plan
603 Not Found this user
604 Not send plan or Username

Credit Transfer errors

700 Credit successfully Added
701 Reseller credits is Finished
702 Not Found this user
703 Credit must be a number and more than 0
704 Not send credit amount or Email

API functions

All API functions return an array that has an element named success that is true or false, if its value is false Communication with api failed and you must send values correctly and another element named message There is an error message that tells you the error codes above.


Active License

With this function you can activate the user account by email. To activate the account you must have License in your reseller account then the server to respond , this process may have an error that is specified above the error code.

Parameters

  • $username - The user email that you want to activate
  • $plan_key - Example : lg | 1 year=> cheetah_tool_pro , 6 month=> cheetah_tool_pro_180 ,3 month=> cheetah_tool_pro_90


Returns

  • success - This value may be false and if the value is returned true, the License is successfully Activated
  • code - Error Code
  • message - Error text


  1. <?php
  2.  
  3. ///////// Reseller Token ////
  4. $api_token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
  5.  
  6. $plan_key = "cheetah_tool_pro"; // values : lg | cheetah_tool_pro | cheetah_tool_pro_180 | cheetah_tool_pro_90
  7. $user_email = "[email protected]";
  8.  
  9. $get = "cmd=active_license&api_token=".$api_token."&username=".$user_email."&plan_key=".$plan_key;
  10. $ch = curl_init();
  11. curl_setopt($ch, CURLOPT_URL, "https://cheetah-tool.com/__r_api/?".$get);
  12. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  13. $request = curl_exec($ch);
  14.  
  15. $response = json_decode($request, true);
  16.  
  17. if ($response['success'] === "true") {
  18. echo "Success Activated: ".$response['code']."<br>";
  19. echo "Message: ".$response['message'];
  20. } else {
  21. echo "Message: ".$response['message']."<br>";
  22. echo "Error: ".$response['code']."<br>";
  23. }




Transfer Credit

With this function you can transfer Credit to users

Parameters

  • $user_email - Registered Email User
  • $credit - The amount of credit


Returns

  • success - This value may be false and if the value is returned true, the Credit is successfully Transfered
  • code - Error Code
  • Message - Error text


  1. <?php
  2.  
  3.  
  4. ///////// Reseller Token ////
  5. $api_token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
  6.  
  7.  
  8. $user_email = "[email protected]";
  9. $credit = 2;
  10.  
  11.  
  12. $get = "cmd=transfer_credit&api_token=".$api_token."&email=".$user_email."&credit=".$credit;
  13. $ch = curl_init();
  14. curl_setopt($ch, CURLOPT_URL, "https://cheetah-tool.com/__r_api/?".$get);
  15. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  16. $request = curl_exec($ch);
  17.  
  18. $response = json_decode($request, true);
  19.  
  20. if ($response['success'] === "true") {
  21. echo "Success Transfered: ".$response['code']."<br>";
  22. echo "Message: ".$response['message'];
  23. } else {
  24. echo "Message: ".$response['message']."<br>";
  25. echo "Error: ".$response['code']."<br>";
  26. }
  27.