Getting curl_error(): 2 is not a valid cURL handle resource while fetching all users from freshdesk api
I am creating my own system to managing all tickets which are comes from freshdesk.com through its API. I am making curl request to fetch data from freshdesk.com. With getting data of related to tickers its works fine but when i am requesting for all users through curl request then its give me error: Warning: curl_errno(): 2 is not a valid cURL handle resource in C:\wamp\www\test.php on line 28. My code is like that: $ch = curl_init(); $cOption = array( CURLOPT_URL => 'http://velocity.freshdesk.com/contacts.xml', CURLOPT_HEADER => 0, CURLOPT_USERPWD => "$email:$password", CURLOPT_POST => false