php - DocuSign Embedded returns timed out exception? -
i have been using docusign embed signing in ui using below php code. have given correct credentials,
public function sign(){ $username = "sample@sample.com"; $password = "sample"; $integrator_key = "1fsfd0658-zv95-4317-a016-d9f76eaasdff9"; // docusign environment using $host = "https://demo.docusign.net/restapi"; // create new docusign configuration , assign host , header(s) $config = new \docusign\esign\configuration(); $config->sethost($host); $config->adddefaultheader("x-docusign-authentication", "{\"username\":\"" . $username . "\",\"password\":\"" . $password . "\",\"integratorkey\":\"" . $integrator_key . "\"}"); // instantiate new docusign api client $apiclient = new \docusign\esign\apiclient($config); // first make login() call exists in authenticationapi... $authenticationapi = new \docusign\esign\api\authenticationapi($apiclient); // optional login parameters $options = new \docusign\esign\api\authenticationapi\loginoptions(); // call login() api echo "djfnksd"; $logininformation = $authenticationapi->login($options); // parse login results if(isset($logininformation) && count($logininformation) > 0) { // note: defaulting first account found, user might // member of multiple accounts $loginaccount = $logininformation->getloginaccounts()[0]; if(isset($logininformation)) { $accountid = $loginaccount->getaccountid(); if(!empty($accountid)) { echo "account id = $accountid\n"; } } } }
but getting error when calling method,
apiexception in apiclient.php line 233: api call https://demo.docusign.net/restapi/v2/login_information timed out:
{ "url": "https:\/\/demo.docusign.net\/restapi\/v2\/login_information", "content_type": null, "http_code": 0, "header_size": 0, "request_size": 0, "filetime": -1, "ssl_verify_result": 1, "redirect_count": 0, "total_time": 1.046, "namelookup_time": 0.515, "connect_time": 0.78, "pretransfer_time": 0, "size_upload": 0, "size_download": 0, "speed_download": 0, "speed_upload": 0, "download_content_length": -1, "upload_content_length": -1, "starttransfer_time": 0, "redirect_time": 0, "redirect_url": "", "primary_ip": "162.248.186.25", "certinfo": [], "primary_port": 443, "local_ip": "192.168.1.12", "local_port": 53163 }
i'm clueless , possible error ?
it working now. solved problem removing ssh verification in apiclient.php. commenting below line
// disable ssl verification, if needed // if ($this->config->getsslverification() == false) { curl_setopt($curl, curlopt_ssl_verifypeer, 0); curl_setopt($curl, curlopt_ssl_verifyhost, 0); //}
Comments
Post a Comment