Hi everyone!
To help you intergrate our getting CID API (by Auto Call) into your system, we will update docs and help at here. We will use C# for sample code, then you can convert to your language.
This is our API:
https://kichhoat24h.com/user-api/get-cid?iid=[iid]&price=[price]&token=[token_id]&send_to_email=[send_to_email]&callback_url=[callback_url]
iid: this is your Installation ID
price: this is price you ready to pay for that installation ID
token: this is your token ID, you can login the website and get it at https://kichhoat24h.com/apis
send_to_email: you can set any email at here, then when auto call completed, we will send IID/CID to this email by using our email system. You can use this for debugging or if you don’t have any SMTP email service.
callback_url: if you set it, when auto call completed, we will call this url and post iid and cid to this url (using POST method).
This is code from our server:
var request = (HttpWebRequest)WebRequest.Create(callback_url);
var postData = "iid=" + Uri.EscapeDataString(iid);
postData += "&cid=" + Uri.EscapeDataString(cid);
var data = Encoding.ASCII.GetBytes(postData);
request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = data.Length;
using (var stream = request.GetRequestStream())
{
stream.Write(data, 0, data.Length);
}
var response = (HttpWebResponse)request.GetResponse();
send_to_email and callback_url are optional options, you can skip them.
We will discuss about the API response now. This is all response cases:
{"success":true,"cid":null,"response_message":"We are calling to get CID for you.","error_message":null}
{"success":true,"cid":null,"response_message":"We are calling to get CID for you and will send it to your email soon.","error_message":null}
{"success":true,"cid":null,"response_message":"We are calling for this IID, please wait for it complete.","error_message":null}
{"success":true,"cid":null,"response_message":"Dead Key.","error_message":null}
{"success":true,"cid":null,"response_message":"Key Blocked.","error_message":null}
{"success":true,"cid":null,"response_message":"Fake Key.","error_message":null}
{"success":true,"cid":null,"response_message":"Need to call MS Support.","error_message":null}
{"success":true,"cid":null,"response_message":"Wrong IID.","error_message":null}{"success":true,"cid":"426296483130829081064403777482905722580616","response_message":"426296483130829081064403777482905722580616","error_message":null}
{"success":false,"cid":null,"response_message":null,"error_message":"Invalid IID Length!"}
{"success":false,"cid":null,"response_message":null,"error_message":"Server busy, please try again later"}
{"success":false,"cid":null,"response_message":null,"error_message":"You have reached maximum calling IIDs, please wait for all complete"}
{"success":false,"cid":null,"response_message":null,"error_message":"Please add credit to using Auto Call."}
{"success":false,"cid":null,"response_message":null,"error_message":"Invalid syntax or token!"} And this is the sample code to get cid from API: public static string GetCID(string iid, float price, string token)
{
string cid = "";
while (true)
{
try
{
var request = (HttpWebRequest)WebRequest.Create("https://kichhoat24h.com/user-api/get-cid");
var postData = "iid=" + Uri.EscapeDataString(iid);postData += "&price=" + Uri.EscapeDataString(price.ToString());postData += "&token=" + Uri.EscapeDataString(token);
var data = Encoding.ASCII.GetBytes(postData);
request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = data.Length;
using (var stream = request.GetRequestStream())
{
stream.Write(data, 0, data.Length);
}
var response = (HttpWebResponse)request.GetResponse();
string res = new StreamReader(response.GetResponseStream()).ReadToEnd();
dynamic dRes = JsonConverter.DeserializeObject<dynamic>(res);
if (dRes["success"] == false)
{
Console.WriteLine(dRes["error_message"]);
break;
}
else if (dRes["cid"] != null)
{
cid = dRes["cid"];
}
else if (!dRes["response_message"].Contains("We are calling"))
{
cid = dRes["response_message"];
}
}
catch (Exception e1)
{
break;
};
Thread.Sleep(1000);
}
return cid;
}
Hope all above information helpful for you. Thank you very much!
Announcement (123)
Share Windows/Office (51416)
Activation Support (358)
Discussion (300)
Share Software/Antivirus (7521)
Tutorials (55)
Sell Products (834)
Buy Products (361)