Question
error when creating an agreement based on a templateid (embedded signing)
Hi,
I am a new user (Developer) of Adobe Sign (in live trial).
I can't figure out why I get this error:
{'code': 'BAD_REQUEST', 'message': 'The request provided is invalid'}
Error creating agreement: {"code":"BAD_REQUEST","message":"The request provided is invalid"}
I can not see what is wrong on my create_agreement_data
# create_send_embedded_signing.py
import requests
access_token = 'dummy123'
template_id = '3AAABLblqZhCvWrW4m3sV4GADuaPQ1duSivAJktzzZaTS2VMonxHZ-h57ULZHquwWO'
# Replace these values with your own
email = 'abc@gmail.com'
role = 'SIGNER'
base_url = 'https://api.na1.adobesign.com/api/rest/v2'
headers = {
'Authorization': f'Bearer {access_token}',
'Content-Type': 'application/json'
}
# Create an agreement using the template
create_agreement_data = {
"fileInfos": [
{
"libraryDocumentId": template_id#,
#"transientDocumentId": transient_doc_id,}
}
],
'name': 'Agreement created from a template via API from Castilleja',
'participantSetsInfo': [
{
'order': 1,
'role': role,
'memberInfos': [
{
'email': email
}
]
}
],
'signatureType': 'ESIGN',
'state': 'IN_PROCESS'
}
response = requests.post(f'{base_url}/agreements', json=create_agreement_data, headers=headers)
agreement = response.json()
print(agreement)
