使用 DocuSign REST API 身份验证登录

Gol*_*ion 3 c# asp.net docusignapi

/我需要传递头信息/ header{ "X-DocuSign-Authentication": "{\"Username\":\"abc@gmail.com\",\"Password\":\"mypassword\",\ "IntegratorKey\":\"the-super-long-key\"}" } / ***我如何将用户名、密码和integratorKey传递给docusign** / '我在docusign站点上测试了参数,它们工作。

Dim sUrl As String = "https://demo.docusign.net/restapi/v1/login_information?api_password=true&include_account_id_guid=true&login_settings=all"         


    Dim oRequest As HttpWebRequest
    oRequest = WebRequest.Create(sUrl)
    oRequest.KeepAlive = False
    oRequest.Headers.Add("Username", "abc@gmail.com")
    oRequest.Headers.Add("Password", "mypassword")
    oRequest.Headers.Add("IntegratorKey", "my-integrator-key")


    Dim oResponse As HttpWebResponse = oRequest.GetResponse   '*****FAILS****
Run Code Online (Sandbox Code Playgroud)

Fal*_*als 5

根据官网认证

oRequest.Headers.Add("X-DocuSign-Authentication",
            string.Format(@"<DocuSignCredentials>
                            <Username>{0}</Username>
                            <Password>{1}</Password>
                            <IntegratorKey>{2}</IntegratorKey>
                           </DocuSignCredentials>",
            "abc@gmail.com",
            "mypassword",
            "my-integrator-key"));
Run Code Online (Sandbox Code Playgroud)

我无法测试,因为我没有有效的帐户!