我遇到连接问题演示API
https://demo.docusign.net/restapi
要连接我使用下面提供的代码,API。它适用于我的美国同事,但是当我尝试从立陶宛连线时,零响应。
难道那里有任何位置限制,或者我错过了什么?
它应该是防火墙的一些细节(我在NAT下)?
我的本地php/http服务器需要一些特定的配置吗?的DocuSign API连接
$email = "some email @ fsdfdsf";
$integratorKey = "TEST-xxxxxxxxxxx";
$password = "some password";
$url = "https://demo.docusign.net/restapi/v2/login_information?include_account_id_guid=true";
$header = "<DocuSignCredentials><Username>" . $email . "</Username><Password>" . $password . "</Password><IntegratorKey>" . $integratorKey . "</IntegratorKey></DocuSignCredentials>";
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array("X-DocuSign-Authentication: $header"));
$json_response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if($status==200){
$response = json_decode($json_response, true);
print_r(json_encode($response['loginAccounts'][0]));
}else{
print_r($json_response);
}
这当然是可能是您的防火墙阻止访问。你收到了什么HTTP错误? FYI DocuSign IP范围(如果您需要更新FW规则),请访问:https://trust.docusign.com/en-us/trust-certifications/ip-ranges/ –
我能够获得登录响应通过REST客户端。但如何通过PHP获得回应,我愿意使用php docusign客户端v2 – Vid
我在通过API登录时收到错误,并且在unittest中发生的错误是相同的。有部分错误信息:
有1个错误: 1)UnitTests :: testLogin DocuSign \ eSign \ ApiException:API调用https://demo.docusign.net/restapi/v2/login_information超时:a :26:{S:3: “URL”; S:54: “https://demo.docusign.net/restapi/v2/login_information”; S:12: “CONTENT_TYPE”; N; S:9:“HTTP_CODE “; i:0; s:1 .............. :”162.248.186.25“; s:8:”certinfo“; a:0:{} s:12: “prim ary_port”; i:443; s:8:“local_ip”; s:13:“192.168.1.126”; s:10:“local_port”; i:38635;} C:\ xampp \ htdocs \ localbits \ ds \ docusign \ src \ ApiClient.php:233 – Vid