You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
result=$(echo "$web_form_config"| sed "s/template-id/$TEMPLATE_ID/g")
24
+
echo$result> demo_documents/web-form-config.json
25
+
26
+
echo""
27
+
echo"Go to your Docusign account to create the Web Form. Go to 'Templates' in your developer account, select 'Start,' select 'Web Forms,' and choose 'Upload Web Form.' Upload the JSON config file 'web-form-config.json' found under the demo_documents folder of this project. You will need to activate the web form before proceeding. Press the enter key after doing so."
28
+
read choice
29
+
#ds-snippet-start:WebForms2Step2
30
+
declare -a Headers=('--header'"Authorization: Bearer ${ACCESS_TOKEN}" \
31
+
'--header'"Accept: application/json" \
32
+
'--header'"Content-Type: application/json")
33
+
#ds-snippet-end:WebForms2Step2
34
+
35
+
# List web forms in account that match the name of the web form we just created
36
+
#ds-snippet-start:WebForms2Step3
37
+
response=$(mktemp /tmp/response-cw.XXXXXX)
38
+
Status=$(curl -w '%{http_code}' --request GET ${base_path}/accounts/${ACCOUNT_ID}/forms?search=Web%20Form%20Example%20Template \
39
+
"${Headers[@]}" \
40
+
--output ${response})
41
+
42
+
FORM_ID=$(cat $response| sed 's/,/\n/g'| grep id | sed 's/.*\"id\":\"//g'| sed 's/\".*//g')
43
+
#ds-snippet-end:WebForms2Step3
44
+
45
+
request_data=$(mktemp /tmp/request-cw-001.XXXXXX)
46
+
#ds-snippet-start:WebForms2Step4
47
+
printf \
48
+
'{
49
+
"sendOption": "now",
50
+
"formValues": {
51
+
"PhoneNumber": "555-555-5555",
52
+
"Yes": ["Yes"],
53
+
"Company": "Tally",
54
+
"JobTitle": "Programmer Writer"
55
+
},
56
+
"recipients": [
57
+
{
58
+
"roleName": "signer",
59
+
"name": "'"${SIGNER_NAME}"'",
60
+
"email": "'"${SIGNER_EMAIL}"'"
61
+
}
62
+
]
63
+
}'>$request_data
64
+
#ds-snippet-end:WebForms2Step4
65
+
66
+
response=$(mktemp /tmp/response-cw.XXXXXX)
67
+
#ds-snippet-start:WebForms2Step5
68
+
Status=$(curl -w '%{http_code}' -i --request POST ${base_path}/accounts/${ACCOUNT_ID}/forms/${FORM_ID}/instances \
0 commit comments