Rajib Hossain Pavel
Rajib Hossain Pavel

Reputation: 437

Zoho Creator API Integration Basic Authorization postUrl()

Here is my code and I am getting Internal Error for postural() call. By the way, one more thing I want to know how we can use verify_peer to 0(zero) for not using SSL things. What is wrong with my code?

void SendSMS(SMS SMSObject)
{
 //CONFIGURATION
 URL = "https://example.com/send_ack.php";

 wbLogin = "wbLogin";
 wbPwd = "wbPwd";
 wbAccount = "wbAccount";
 label = "label";
 applicationName = "ADR SMS v1.0";

 //BASE64 ENCODING
 Base64Encoded = zoho.encryption.base64Encode("httpLogin:httpPwd");
 AuthorizationBasic = "Authorization: Basic " + Base64Encoded;

 //HEADER
 HeaderMap = Map();
 HeaderMap.put("content-type", "application/x-www-form-urlencoded");
 HeaderMap.put("Authorization", AuthorizationBasic);

 //REQUEST
 RequestMap = Map();
 RequestMap.put("compte", wbAccount);
 RequestMap.put("op", 1);
 RequestMap.put("type", 0);
 RequestMap.put("dt", zoho.currentdate.getDay());
 RequestMap.put("hr", zoho.currenttime.getHour());
 RequestMap.put("mn", zoho.currenttime.getMinutes());
 RequestMap.put("label", label);
 RequestMap.put("dest_num", "phone_number");     
 RequestMap.put("msg", "ZC Testing");
 RequestMap.put("ref", "ZC");

 //CALL POSTURL
 Result = postUrl(URL, RequestMap, HeaderMap, false);

     //DEBUG
 info Result;
}

Upvotes: 1

Views: 638

Answers (1)

MichaelAmato
MichaelAmato

Reputation: 108

Use Zoho Creator API for this purpose.

Upvotes: 1

Related Questions