DocuSign SOAP API: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)

半世苍凉 提交于 2020-01-17 05:59:08

问题


I sent a DocuSign SOAP API request. DocuSign responded with status 500 and faultstring of

1234: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

I searched for the error code 1234 in the docs and online but couldn't find it.

The headers and XML I sent:

Content-Type: text/xml; charset=UTF-8
SOAPAction: "http://www.docusign.net/API/3.0/CreateAndSendEnvelope"
X-DocuSign-Authentication: <DocuSignCredentials><Username>email@example.com</Username><Password>[omitted]</Password><IntegratorKey>[omitted]</IntegratorKey></DocuSignCredentials>

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Header/>
<env:Body>
    <CreateAndSendEnvelope xmlns="http://www.docusign.net/API/3.0">
    <Envelope>
        <AccountId>1234</AccountId>
        <Documents>
            <Document>
                <ID>1</ID>
                <Name>NDA Document</Name>
                <PDFBytes>[omitted]</PDFBytes>
                <FileExtension>html</FileExtension>
            </Document>
        </Documents>
        <Recipients>
            <Recipient>
                <ID>1</ID>
                <UserName>Larry Example</UserName>
                <Email>larry@example.com</Email>
                <Type>Signer</Type>
                <AccessCode xsi:nil="true"/>
                <RoutingOrder>1</RoutingOrder>
            </Recipient>
        </Recipients>
        <Subject>Please sign the NDA package</Subject>
    </Envelope>
</CreateAndSendEnvelope>
</env:Body>
</env:Envelope>

回答1:


I managed to solve the problem:

The XML faultstring of

1234: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

did not mean error code 1234. Instead it meant that my supplied value of 1234 (for the account ID) should have been provided in the "long form" of a guid.

For the account ID, the guid version of the account id value is shown in the Admin tool, in the "API and Keys" section.

At the top of the page, it shows the "API Account ID" -- that's the long form version of the Account ID that's needed.

When I substituted the guid version of the account ID for the short version, the XML request worked fine.



来源:https://stackoverflow.com/questions/39404029/docusign-soap-api-guid-should-contain-32-digits-with-4-dashes-xxxxxxxx-xxxx-xx

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!