Docusign REST API: Downloading document to string

后端 未结 1 1717
轻奢々
轻奢々 2021-01-21 10:45

I am building an app using the docusign API and PHP. I have most of this working except I cannot figure out how to download the document. I have been searching on this site and

相关标签:
1条回答
  • 2021-01-21 11:42

    The content comes back as a file, you have to read the temp file and save that to the desired file

    Quick snippet using file_get_contents and file_put_contents

    $docStream = $envelopeApi->getDocument($accountId, 1, $envelopeId);
    file_put_contents("my_document.pdf", file_get_contents($docStream->getPathname()));
    

    More info DocuSign REST API :: EnvelopeDocuments: get under Get a Single Document as a PDF File

    0 讨论(0)
提交回复
热议问题