问题
I am using SOAP based API call "CreateAndSendEnvelope" to create an envelope into desired DocuSign account.
When I add recipients as Captive/Embedded recipient(s), I am able to create an envelope fine but while requesting tokens for the captive recipients, I am getting an error "Invalid Signature Credentials".
Here is my request that I have made against my DocuSign demo account.
POST https://demo.docusign.net/api/3.0/dsapi.asmx HTTP/1.1
Content-Type: text/xml; charset=utf-8
X-DocuSign-Authentication:
<DocuSignCredentials>
<Username>****</Username>
<Password>*****</Password>
<IntegratorKey>********</IntegratorKey>
</DocuSignCredentials>
VsDebuggerCausalityData: uIDPo7akWKVLPM1FtqgHGlxmVBgAAAAAh0Xpou1aEkuLAhpZehuVUhAFJ+e2a3JJm4f7e3PmDFMACQAA
SOAPAction: "http://www.docusign.net/API/3.0/RequestRecipientToken"
Host: demo.docusign.net
Content-Length: 1851
Expect: 100-continue
Accept-Encoding: gzip, deflate
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<RequestRecipientToken xmlns="http://www.docusign.net/API/3.0">
<EnvelopeID>353c8881-feac-4803-b1f9-5248feb04e70</EnvelopeID>
<ClientUserID>771</ClientUserID>
<Username>Minal **</Username>
<Email>*******</Email>
<AuthenticationAssertion>
<AssertionID>74ea161d-5dea-4a2c-8ffb-e754beaab660</AssertionID>
<AuthenticationInstant>2014-06-27T09:17:06.7147424-04:00</AuthenticationInstant>
<AuthenticationMethod>Password</AuthenticationMethod>
<SecurityDomain>Request Recipient Token</SecurityDomain>
</AuthenticationAssertion>
<ClientURLs>
<OnSigningComplete>****;event=SignComplete</OnSigningComplete>
<OnViewingComplete****;event=ViewComplete</OnViewingComplete>
<OnCancel>*******;event=Cancel</OnCancel>
<OnDecline>******;event=Decline</OnDecline>
<OnSessionTimeout>*****;event=Timeout</OnSessionTimeout>
<OnTTLExpired>*****;event=TTLExpired</OnTTLExpired>
<OnException>*****;event=Exception</OnException>
<OnAccessCodeFailed>*****;event=AccessCode</OnAccessCodeFailed>
<OnIdCheckFailed>*******;event=IDCheck</OnIdCheckFailed>
</ClientURLs>
</RequestRecipientToken>
</s:Body>
</s:Envelope>
回答1:
The reason you are receiving the error "Invalid Signature Credentials" is because when using Embedded (aka Captive) recipients you need sign your requests with an X509 certificate. This is required when your integration is in production, but in the demo environment the certificates are not required.
Unfortunately though if you are receiving this error it means that there is a setting or two not enabled on your dev account, and this is something that you need to contact DocuSign support or your account manager to have resolved.
To possibly help speed the request I can tell you that the two options that need to be enabled on your account are labeled
In Session
Don't Enforce In Session Certificate
Once both are enabled you should be able to use Embedded Recipients.
来源:https://stackoverflow.com/questions/24454106/docusign-api-invalid-signature-credentials-error-using-captive-embedded-rec