I'm trying to call a URL from PHP via cURL, but no response from server.
Following is my URL:
$url = 'https://id:[email protected]/oauth/token \ -X POST \ -d "grant_type=client_credentials&scope=manage_project:test"';
Curl code:
$auth = curl_init($url);
curl_setopt($auth, CURLOPT_POST, true);
curl_setopt($auth, CURLOPT_HEADER, false);
curl_setopt($auth, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($auth);
curl_close($auth);
print_r($response);
When I execute the same URL in terminal get response from server. What's wrong in cURL code?
CURLis installed in your web server, right?