2013-10-23 49 views
0
X-DocuSign-Authentication=[<DocuSignCredentials><SendOnBehalfOf>UserId from CheckAccountMemberResult</SendOnBehalfOf><Username>apiusername</Username><Password>passs</Password><IntegratorKey>apikey</IntegratorKey></DocuSignCredentials>]} 

我正在測試「Send On Behalf Of」功能並在主題中收到錯誤。 請讓我知道我失蹤了什麼?SendOnBehalfOf - User_Authentication_Failed - 缺少驗證標頭

我必須參加Auth令牌路由嗎?如果是這種情況,我必須使用操作用戶的密碼而不是api用戶的密碼。我很困惑。

感謝 ň

更新:另一個驚喜。身份驗證對API憑據正常工作(沒有SendOnBehalfOf標記)。現在不是。希望Docusign沒有進行任何維護。

+0

對此有何更新?謝謝! – NVN

回答

1

當使用SOAP發送時,發送用戶在身份驗證頭的Email元素中被標識。例如,假設我的API用戶名是「[email protected]」,我的發送用戶名是「[email protected]」。如果使用的是DSAPI.asmx端點,認證頭是這樣的:

X-DocuSign-Authentication: <DocuSignCredentials><Username>[[email protected]][email protected]</Username><Password>mypassword</Password><IntegratorKey>EXPL-00000000-0000-0000-0000-000000000000</IntegratorKey></DocuSignCredentials> 

當使用WS-Security和API.asmx端點,類似的結構用:

<SOAP-ENV:Header> 
    <wsse:Security mustUnderstand="true"> 
    <wsse:UsernameToken> 
     <wsse:Username>[EXPL-00000000-0000-0000-0000-000000000000][[email protected]][email protected]</wsse:Username> 
     <wsse:Password>mypassword</wsse:Password> 
     <wsse:Nonce>00000000000000000000000000000000</wsse:Nonce> 
     <wsu:Created>2013-10-29T20:37:59.241468Z</wsu:Created> 
    </wsse:UsernameToken> 
    </wsse:Security> 
</SOAP-ENV:Header> 

僅供參考,OAuth2不是必需的,目前在SOAP API中不受支持。

+0

我只是發送帶有標頭的請求:'地址:https://demo.docusign.net/api/3.0/dsapi.asmx 編碼:UTF-8 內容類型:text/xml 標題:{Accept = [應用程序/ xml],SOAPAction = [「http://www.docusign.net/API/3.0/CreateAndSendEnvelope」],X-DocuSign-Authentication = [ [email protected] ***** *** TRAN-00000000000000000]}'。響應再次爲' User_Authentication_Failed - 缺少認證頭'。我們能否知道爲什麼我們的請求被拒絕?謝謝! – NVN

+0

您能否獲得原始要求?你發佈的內容似乎是數據結構的轉儲(字典保存數組?),所以我想確保它正確地將其發送到請求中。謝謝! –

+0

非常感謝您指出這一點。標題在準備請求的同時在稍後的階段添加。如果有人使用Apache CXF客戶端,請在攔截器中使用「Phase.POST_LOGICAL」來填充X-DocuSign-Authentication頭。再次,非常感謝! – NVN

0

您是否閱讀過DocuSign REST API指南(http://www.docusign.com/sites/default/files/REST_API_Guide_v2.pdf)中「發送代表DocuSign REST API功能的代碼」部分(p16-18)?這個內容提供了一個如何在DocuSign REST API中使用SOBO的體面概述,甚至還包括一些示例。

+0

我的確在下面提到:「使用電子郵件地址的示例」一節第17頁。順便說一句,我使用SOAP雖然。 – NVN

+0

啊,好吧 - SOAP API ...明白了。 (您在問題中鏈接到的文檔頁面來自REST API指南 - 因此可能並不適用於SOAP API。)也許本文檔將幫助您:http://www.docusign.com/sites/default /files/Send%20On%20Behalf%20Of%20Functionality%20Guide.pdf。我注意到DocuSign SOAP API文檔中的所有SOBO示例都顯示了通過WS-Security UsernameToken(不通過X-DocuSign-Authentcation在HTTP頭中)在SOAP Header中傳遞的憑證。 –

+0

「來自[docs](http://www.docusign.com/p/APIGuide)的** DSAPI.asmx **和AccountManagement.asmx端點**需要** HTTP ** Header **身份驗證方法/APIGuide.htm#Introduction+Changes/Authentication.htm%3FTocPath%3DAuthentication|_____0) – NVN