如何从docusign API获取文档?

I want to know how can I get a signed document from docusign API? I can already do a signture request via email (it works fine!). But I want that when a document is completed to show it on url click.

The documentation is not very clear...

Here a part of my php code:

try
    {
        //*** STEP 1 - Login API: get first Account ID and baseURL
        //..............//

        if(isset($loginInformation) && count($loginInformation) > 0)
        {
            $loginAccount = $loginInformation->getLoginAccounts()[0];
            $host = $loginAccount->getBaseUrl();
            $host = explode("/v2",$host);
            $host = $host[0];

            // UPDATE configuration object
            $config->setHost($host);

            // instantiate a NEW docusign api client (that has the correct baseUrl/host)
            $apiClient = new DocuSign\eSign\ApiClient($config);

            if(isset($loginInformation))
            {
                $accountId = $loginAccount->getAccountId();
                if(!empty($accountId))
                {
                    $envelopeApi = new DocuSign\eSign\Api\EnvelopesApi($apiClient);

                    $docsList = $envelopeApi->listDocuments($accountId, $envelopeId);
                    $documents = $docsList->getEnvelopeDocuments();

                    foreach($documents as $index => $document)
                    {
                        $url = $config->getHost().'/v2/accounts/'.$accountId.'/'.$document->getUri();
//------>Here i get the url but i cant read this file???

                    }
                }
            }
        }
    }

This url doesn't response, what am I doing wrong?

the getUri() method on the document simply returns back the Uri that correspond to the API call to get this document. That's not how you download the document. You get it using getDocumentBase64() which will return a long string of the doc in base64. then if you want to convert this back to bits you can use the base64_decode method. Then you can sent it back from server to client as a pdf document to be downloaded.