I am following below link:
https://developers.docusign.com/esign-rest-api/guides/authentication/oauth2-code-grant
Step 1 worked fine and I am able to receive Authorization Code
Step 2 Not working gives error "Could not resolve host: account-d.docusign.com%2Foauth%2Ftoken"
Running this on Apache server, php 7.3, using CURL.
$authcode = "";    
if(isset($_GET['code'])){    
    $authcode = $_GET['code'];    
}    
$headauth = base64_encode('bbc034da-a19f-48db-a841-25832e209a41:2f08bab1-2ccc-435f-a1f7-d43802b51255');    
$request_headers = array();    
$request_headers[] = 'Content-Type: application/x-www-form-urlencoded';    
$request_headers[] = 'Authorization: Basic '.$headauth;    
$ch = curl_init();    
$url = str_replace ( ' ', '%20', "https://account-d.docusign.com/oauth/token" );    
curl_setopt($ch, CURLOPT_URL,urlencode($url));    
curl_setopt($ch, CURLOPT_HEADER, 1);    
curl_setopt($ch, CURLOPT_POST, 1);    
curl_setopt($ch, CURLOPT_POSTFIELDS,"grant_type=authorization_code&code=".$authcode."&redirect_uri=http://192.168.2.56/testdocusign/test.php");  //Post Fields    
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);    
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);    
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,  0);    
curl_setopt($ch, CURLOPT_HTTPHEADER, $request_headers);    
$server_output = curl_exec ($ch);    
if (curl_errno($ch)) {    
    $error_msg = curl_error($ch);    
    print_r($error_msg);    
}    
curl_close ($ch);    
print_r($server_output) ;    
I expect result something like below:
{    
    "access_token": "ISSUED_ACCESS_TOKEN",    
    "token_type": "Bearer",    
    "refresh_token": "ISSUED_REFRESH_TOKEN",    
    "expires_in": 28800    
}  
But my current error is :
Could not resolve host: account-d.docusign.com%2Foauth%2Ftoken
 
     
    