9 Replies Latest reply on Jun 7, 2017 7:49 PM by user19752

    FM16 cURL help! Docusign

    cstowell@crown-point.com

      This is all based off the demo provided by DocuSign at DocuSign. I have [REMOVED] all personal information from the code posted here.

       

      When I run the following through Terminal the content in payload.json gets upload to Docusign without issue.

       

      curl -X POST -d @payload.json \
                            -H "Accept: application/json" \
                            -H "Content-Type: application/json" \
                            -H 'X-DocuSign-Authentication: { "Username":"[REMOVED]",
                                                             "Password":"[REMOVED]",
                                                             "IntegratorKey":"[REMOVED"}' \
                    https://demo.docusign.net/restapi/v2/accounts/[REMOVED]/envelopes
      

       

      When I put payload.json into a container field and store as variable $json I get the error Invalid_Content_type: Content Type specified is not supported. I am new to cURL so I am hoping something in my script will stick out to those of you that aren't! I know the header content works as I use that to get the baseURL required as seen in line 7 of the above code.

       

      " -X POST -d @$json" &

      " -H \\\"Accept: application/json\\\"" &

      " -H \\\"Content-Type: application/json\\\"" &

      " -H \"X-DocuSign-Authentication:{\\\"Username\\\":\\\"[REMOVED]\\\",\\\"Password\\\":\\\"[REMOVED]\\\",\\\"IntegratorKey\\\":\\\"[REMOVED]\\\"}\""