简体   繁体   中英

How do I use PHP cURL to POST a request to DocuSign's Create Envelope From Document REST endpoint?

I am trying to figure out how to implement the example located on this page:

http://www.docusign.com/p/RESTAPIGuide/RESTAPIGuide.htm

Using PHP and cURL. I'm having a lot of trouble... no matter what I try, it will not work. Can someone please provide a specific PHP cURL example of how to create an envelope from a document via PHP using DocuSign's REST endpoint?

Thank you!

Have you seen the code walkthroughs? Check out the PHP one that uses curl right there:

http://iodocs.docusign.com/APIWalkthrough/requestSignatureFromDocument

The Quick Start section of the DocuSign Dev Center contains some useful resources for this. The first call you make on a new dev account is the Login API call - which retrieves your account's baseUrl and accountId. With those you can then start making signature requests and any other subsequent API calls.

The Quick Start - Your First API Call section has a full cURL command line example that shows you how to make the Login call. It looks like this:

curl --request GET 'https://demo.docusign.net/restapi/v2/login_information' 
--header 'Content-Type:application/json' 
--header 'Accept:application/json' 
--header 'X-DocuSign-Authentication:string'

And the next page of the Quick Start section, titled Request A Signature has a PHP code Gist that uses curl to demonstrate a signature request on a document:

Request A Signature Tutorial

The top of the page describes the request you will be making and if you scroll down you'll see the code gist further below.

The other answer from Mike that references the API Code Walkthroughs is also a great resource:

DocuSign API Tools Page

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM