File tree Expand file tree Collapse file tree 1 file changed +17
-14
lines changed
Expand file tree Collapse file tree 1 file changed +17
-14
lines changed Original file line number Diff line number Diff line change @@ -84,10 +84,11 @@ curl --header "Authorization: Bearer {ACCESS_TOKEN}" \
8484echo " "
8585echo " Response:"
8686cat $response
87+ echo " "
8788
8889# pull out the envelopeId
89- ENVELOPE_ID=` cat $response | grep envelopeId | sed ' s/.*\"envelopeId\": \"//' | sed ' s/\",//' `
90- echo " EnvelopeId: | ${ENVELOPE_ID} | "
90+ ENVELOPE_ID=` cat $response | grep envelopeId | sed ' s/.*\"envelopeId\": \"//' | sed ' s/\",//' | tr -d ' \r ' `
91+ echo " EnvelopeId: ${ENVELOPE_ID} "
9192
9293
9394# Step 2. Create a recipient view (a signing ceremony view)
@@ -98,6 +99,7 @@ echo "EnvelopeId: |${ENVELOPE_ID}|"
9899# For this example, we'll use http://httpbin.org/get to show the
99100# query parameters passed back from DocuSign
100101
102+ echo " Request the url for the signing ceremony..."
101103curl --header " Authorization: Bearer {ACCESS_TOKEN}" \
102104 --header " Content-Type: application/json" \
103105 --data-binary '
@@ -112,24 +114,25 @@ curl --header "Authorization: Bearer {ACCESS_TOKEN}" \
112114 --output ${response}
113115
114116echo " "
115- echo " Get recipient view response :"
117+ echo " Response :"
116118cat $response
119+ echo " "
117120
118-
119-
120- # echo ""
121- # echo ""
122- # echo "Files"
123- # echo "$request_data"
124- # echo "$doc1_base64"
125- # echo "$doc2_base64"
126- # echo "$doc3_base64"
121+ REDIRECT_URL=` cat $response | grep url | sed ' s/.*\"url\": \"//' | sed ' s/\"//' | tr -d ' \r' `
122+ echo " "
123+ echo " Attempting to automatically open your browser to the signing ceremony url..."
124+ if which open > /dev/null 2> /dev/null
125+ then
126+ open " $REDIRECT_URL "
127+ elif which start > /dev/null
128+ then
129+ start " $REDIRECT_URL "
130+ fi
127131
128132# cleanup
129133rm " $request_data "
134+ rm " $response "
130135rm " $doc1_base64 "
131- rm " $doc2_base64 "
132- rm " $doc3_base64 "
133136
134137echo " "
135138echo " "
You can’t perform that action at this time.
0 commit comments