Search code examples
soapadobeechosign

Why do i get "Wrong API base URL used" when pinging Adobe EchoSign Cloud by a SOAP request?


I am trying to access signed documents within the Adobe EchoSign Cloud. I have got an API key for authentication and used it in a testPing SOAP request like

<soapenv:Envelope 
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:api="http://api.echosign">
    <soapenv:Header/>
    <soapenv:Body>
        <api:testPing>
            <api:apiKey>myKeyhere</api:apiKey>
        </api:testPing>
    </soapenv:Body>
</soapenv:Envelope>

I sent this request to

https://secure.echosign.com/services/EchoSignDocumentService22

But as a result I only get

<soap:Envelope 
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soap:Body>
        <soap:Fault>
            <faultcode>soap:Server</faultcode>
            <faultstring>Wrong API base URL used</faultstring>
        </soap:Fault>
    </soap:Body>
</soap:Envelope>

What does that message mean?


Solution

  • I found an important note in the Adobe documentation:

    However, starting from version 22 of the Document API, all API calls must be made on a specific base URL obtained either using the OAuth workflow (the api_access_point parameter that is included with an authorization code) or by making a call to the getBaseUris method. The corresponding gateway can then be constructed by concatenating the base URL with "services/EchoSignDocumentService22". Calls made on the wrong base URL will result in an exception indicating that the wrong API base URL was used. Note that getBaseUris itself can be called on any appropriate gateway, including the one mentioned above.

    Calling getBaseUris indeed returns another URI which then can be used for subsequent requests.