簡體   English   中英

使用REST API的Docusign真實帳戶身份驗證不起作用

[英]Docusign live account authentication using REST API not working

我是Docusign的新手。 我已經在PHP語言上使用REST API開發了一個應用程序。 在模擬賬戶中,一切正常。 但是在真實帳戶中不起作用。 錯誤正在調用Web服務,狀態為0。我嘗試了很多方法,但無法解決。 請幫我。 我的身份驗證代碼如下。

$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);

您是否已完成DocuSign API認證流程? 在完成API認證流程並且DocuSign批准了您的集成商密鑰用於生產環境之前,您的集成將無法對Production DocuSign帳戶進行操作。 (認證過程的主要目的是確保DocuSign不會進行對生產環境有害的任何事情,並確保您能夠從應用程序中生成API請求/響應信息。如果將來您需要DocuSign支持的幫助-一旦您“通過/完成”認證,DocuSign將啟用您的Integrator密鑰以用於生產。)

DocuSign開發人員中心( https://www.docusign.com/developer-center )包含有關API認證過程的信息。 特別是,請查看 “上線”部分中的鏈接:

DS開發人員中心上線

上線-概述頁面是一個很好的起點: https//www.docusign.com/developer-center/go-live/overview

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM