Reputation: 57
I am new on Docusign. I have developed a application using REST API on PHP language. In demo account everything is working fine. But in live account does not working. Error is calling webservice and status is 0. I tried many way but can't solve. Please help me. My code for authentication is given below.
$integratorKey = 'xxxxxx';
$email = 'xxxx';
$password = 'xxxx';
// construct the authentication header:
$header = "<DocuSignCredentials><Username>" . $email . "</Username><Password>" . $password . "</Password><IntegratorKey>" . $integratorKey . "</IntegratorKey></DocuSignCredentials>";
$url = "https://www.docusign.net/restapi/v2/login_information";
$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);
//echo $status;
if ( $status != 200 ) {
echo "error calling webservice, status is:" . $status;
exit(-1);
}
$response = json_decode($json_response, true);
$accountId = $response["loginAccounts"][0]["accountId"];
$baseUrl = $response["loginAccounts"][0]["baseUrl"];
curl_close($curl);
Upvotes: 1
Views: 965
Reputation: 13490
Have you completed the DocuSign API Certification process yet? Your integration will not work against a Production DocuSign account until you've completed the API Certification process and DocuSign has approved your Integrator Key for use in the Production environment. (The main purpose of the certification process is for DocuSign to ensure that your integration isn't doing anything that would be harmful to the Production environment, and to ensure that you're able to produce API request/response information from your app, in case you ever need help from DocuSign support in the future -- once you "pass/complete" certification, DocuSign will enable your Integrator Key for use in Production.)
The DocuSign Developer Center (https://www.docusign.com/developer-center) contains information about the API Certification process. In particular, check out the links in "Go Live" section:
The Go Live - Overview page is a good starting point: https://www.docusign.com/developer-center/go-live/overview
Upvotes: 3