Topics started by david
I was trying to create a user in PHP. My code is shown below:$urltopost = "http://mysite.freshdesk.com/contacts.xml";$header = "Content-type: application/xml";$datatopost = "<user><name>".$fname." ".$lname."</name><email>".$email."</email></user>";$ch = curl_init ($urltopost);curl_setopt ($ch, CURLOPT_POST, true);curl_setopt($ch, CURLOPT_USERPWD, FRESHDESK_USER_NAME . ":" . FRESHDESK_PASSWORD);curl_setopt($ch, CURLOPT_HTTPHEADER, $header);curl_setopt ($ch, CURLOPT_POSTFIELDS, $datatopost);curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);$returndata = curl_exec ($ch);echo($returndata); However the result that I get is the following:You are being redirected.The "redirected" is a link to:https://mysite.freshdesk.com/contacts.xml I started off writing this not knowing why I was getting the above error but then I realised.I had set up security to always use SSL. I had specified$urltopost = "http://mysite
Join the Community
Sign in to the Community
Social LoginLogin for Freshworks Employees Login with LinkedIn
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.