Docusign API Signature Request - UNSPECIFIED_ERROR - ErrorCode: 1, ErrorReason: An Error Occured

456 views Asked by At

I signed up for DocuSign demo account and I'm trying to submit a signature request but keep getting "Unspecified Error" response. I'm using SOAP API and PHP. I would appreciate any hints on possible reasons causing this error message. My sample request below:

<?xml version="1.0" encoding="UTF-8" ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.docusign.net/API/3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
  <SOAP-ENV:Header>
    <wsa:Action>http://www.docusign.net/API/3.0/CreateEnvelopeFromTemplatesAndForms</wsa:Action>
    <wsa:To>https://demo.docusign.net/api/3.0/api.asmx</wsa:To>
    <wsa:MessageID>uudi:e3be95a2-819d-9760-bdec-b73b2c99933b</wsa:MessageID>
    <wsa:ReplyTo>
      <wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
    </wsa:ReplyTo>
    <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" SOAP-ENV:mustUnderstand="1">
      <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
        <wsu:Created>2015-06-10T22:58:06Z</wsu:Created>
        <wsu:Expires>2015-06-10T23:03:06Z</wsu:Expires>
      </wsu:Timestamp>
      <wsse:UsernameToken>
        <wsse:Username>[INTEGRATOR_KEY_HERE]USERNAME_KEY_HERE</wsse:Username>
        <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">PASSWORD_HERE</wsse:Password>
        <wsse:Nonce>0jmJAY+vX41kkU5y5clzyp2goK3prYljWKIs8AR+5tE=</wsse:Nonce>
        <wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2015-06-10T22:58:06Z</wsu:Created>
      </wsse:UsernameToken>
    </wsse:Security>
  </SOAP-ENV:Header>
  <SOAP-ENV:Body>
    <ns1:CreateEnvelopeFromTemplatesAndForms>
      <ns1:EnvelopeInformation>
        <ns1:AccountId>ACCOUNT_ID_HERE</ns1:AccountId>
        <ns1:EmailBlurb>Some message</ns1:EmailBlurb>
        <ns1:Subject>Some subject</ns1:Subject>
      </ns1:EnvelopeInformation>
      <ns1:CompositeTemplates>
        <ns1:CompositeTemplate>
          <ns1:InlineTemplates>
            <ns1:InlineTemplate>
              <ns1:Sequence>1</ns1:Sequence>
              <ns1:Envelope>
                <ns1:AccountId>ACCOUNT_ID_HERE</ns1:AccountId>
                <ns1:Recipients>
                  <ns1:Recipient>
                    <ns1:ID>1</ns1:ID>
                    <ns1:UserName>Joe Doe</ns1:UserName>
                    <ns1:Email>[email protected]</ns1:Email>
                    <ns1:Type>Signer</ns1:Type>
                    <ns1:AccessCode xsi:nil="true" />
                    <ns1:RequireIDLookup>false</ns1:RequireIDLookup>
                    <ns1:RoutingOrder>1</ns1:RoutingOrder>
                    <ns1:RoleName>Applicant</ns1:RoleName>
                  </ns1:Recipient>
                  <ns1:Recipient>
                    <ns1:ID>2</ns1:ID>
                    <ns1:UserName>Jane Doe</ns1:UserName>
                    <ns1:Email>[email protected]</ns1:Email>
                    <ns1:Type>Signer</ns1:Type>
                    <ns1:AccessCode xsi:nil="true" />
                    <ns1:RequireIDLookup>false</ns1:RequireIDLookup>
                    <ns1:RoutingOrder>2</ns1:RoutingOrder>
                    <ns1:RoleName>Co-Applicant</ns1:RoleName>
                  </ns1:Recipient>
                </ns1:Recipients>
                <ns1:Tabs>
                  <ns1:Tab>
                    <ns1:RecipientID>1</ns1:RecipientID>
                    <ns1:AnchorTabItem>
                      <ns1:AnchorTabString>{SIGNATURE}</ns1:AnchorTabString>
                      <ns1:XOffset>0</ns1:XOffset>
                      <ns1:YOffset>0</ns1:YOffset>
                      <ns1:Unit>Pixels</ns1:Unit>
                      <ns1:IgnoreIfNotPresent>true</ns1:IgnoreIfNotPresent>
                    </ns1:AnchorTabItem>
                    <ns1:Type>SignHere</ns1:Type>
                    <ns1:TabLabel>Signature</ns1:TabLabel>
                  </ns1:Tab>
                  <ns1:Tab>
                    <ns1:RecipientID>1</ns1:RecipientID>
                    <ns1:AnchorTabItem>
                      <ns1:AnchorTabString>{INITIAL}</ns1:AnchorTabString>
                      <ns1:XOffset>0</ns1:XOffset>
                      <ns1:YOffset>0</ns1:YOffset>
                      <ns1:Unit>Pixels</ns1:Unit>
                      <ns1:IgnoreIfNotPresent>true</ns1:IgnoreIfNotPresent>
                    </ns1:AnchorTabItem>
                    <ns1:Type>InitialHere</ns1:Type>
                    <ns1:TabLabel>Initial</ns1:TabLabel>
                  </ns1:Tab>
                  <ns1:Tab>
                    <ns1:RecipientID>1</ns1:RecipientID>
                    <ns1:AnchorTabItem>
                      <ns1:AnchorTabString>{SIGNDATE}</ns1:AnchorTabString>
                      <ns1:XOffset>0</ns1:XOffset>
                      <ns1:YOffset>0</ns1:YOffset>
                      <ns1:Unit>Pixels</ns1:Unit>
                      <ns1:IgnoreIfNotPresent>true</ns1:IgnoreIfNotPresent>
                    </ns1:AnchorTabItem>
                    <ns1:Type>DateSigned</ns1:Type>
                    <ns1:TabLabel>Date</ns1:TabLabel>
                  </ns1:Tab>
                  <ns1:Tab>
                    <ns1:RecipientID>2</ns1:RecipientID>
                    <ns1:AnchorTabItem>
                      <ns1:AnchorTabString>{COSIGNATURE}</ns1:AnchorTabString>
                      <ns1:XOffset>0</ns1:XOffset>
                      <ns1:YOffset>0</ns1:YOffset>
                      <ns1:Unit>Pixels</ns1:Unit>
                      <ns1:IgnoreIfNotPresent>true</ns1:IgnoreIfNotPresent>
                    </ns1:AnchorTabItem>
                    <ns1:Type>SignHere</ns1:Type>
                    <ns1:TabLabel>Signature</ns1:TabLabel>
                  </ns1:Tab>
                  <ns1:Tab>
                    <ns1:RecipientID>2</ns1:RecipientID>
                    <ns1:AnchorTabItem>
                      <ns1:AnchorTabString>{COINITIAL}</ns1:AnchorTabString>
                      <ns1:XOffset>0</ns1:XOffset>
                      <ns1:YOffset>0</ns1:YOffset>
                      <ns1:Unit>Pixels</ns1:Unit>
                      <ns1:IgnoreIfNotPresent>true</ns1:IgnoreIfNotPresent>
                    </ns1:AnchorTabItem>
                    <ns1:Type>InitialHere</ns1:Type>
                    <ns1:TabLabel>Initial</ns1:TabLabel>
                  </ns1:Tab>
                  <ns1:Tab>
                    <ns1:RecipientID>2</ns1:RecipientID>
                    <ns1:AnchorTabItem>
                      <ns1:AnchorTabString>{COSIGNDATE}</ns1:AnchorTabString>
                      <ns1:XOffset>0</ns1:XOffset>
                      <ns1:YOffset>0</ns1:YOffset>
                      <ns1:Unit>Pixels</ns1:Unit>
                      <ns1:IgnoreIfNotPresent>true</ns1:IgnoreIfNotPresent>
                    </ns1:AnchorTabItem>
                    <ns1:Type>DateSigned</ns1:Type>
                    <ns1:TabLabel>Date</ns1:TabLabel>
                  </ns1:Tab>
                </ns1:Tabs>
              </ns1:Envelope>
            </ns1:InlineTemplate>
          </ns1:InlineTemplates>
          <ns1:Document>
            <ns1:ID>1</ns1:ID>
            <ns1:Name>Account Withdrawal Request</ns1:Name>
            <ns1:PDFBytes>BASE64ENCODED_DOC_HERE</ns1:PDFBytes>
            <ns1:TransformPdfFields>true</ns1:TransformPdfFields>
            <ns1:FileExtension>pdf</ns1:FileExtension>
          </ns1:Document>
        </ns1:CompositeTemplate>
      </ns1:CompositeTemplates>
      <ns1:ActivateEnvelope>false</ns1:ActivateEnvelope>
    </ns1:CreateEnvelopeFromTemplatesAndForms>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

1

There are 1 answers

0
Ergin On

Agreed that DocuSign's API should return a more user friendly message here. For the benefit of the community though, in this case it looks like it was an invalid PDF that was being sent. For future requests that receive the dreaded UNSPECIFIED_ERROR start by ensuring you're sending a valid document.