REST Python Example - unauthorised error
Wednesday, June 8, 2016 at 04:50amHello
https://developer.esignlive.com/code-share/esignlive-rest-client-using-python/
looking at the python code, i'm trying to run one of the example application use cases. i'm simply grabbed my API key, and updated the sandbox API url parameters.
from my observations, the remaining attributes (guid / doc_id / temp_id) are not required yet?
any assistance and guidance would be greatly appreciated.
client = EslClient('enVyZ1A3....4b0U4Tw==', 'https://sandbox.e-signlive.ca/api/')
guid = ''
doc_id = ''
temp_id = ''
guid_del = ''
# test1 for creating package
payload = codecs.open('package.json', 'r',encoding='utf8').read()
print(payload)
documents = {'file': open(os.getcwd()+'/document.pdf', 'rb').read()}
print(client.create_package_multipart(payload, documents))
# test1 end
Program Execution Results:
/usr/local/Cellar/python/2.7.11/bin/python2.7 /Users/regandediana/PycharmProjects/esl272/esl.py
{
"status": "DRAFT",
"roles": [{
"id": "signer1",
"signers": [{
"email": "[email protected]",
"firstName": "j",
"lastName": "doe"
}]
}],
"documents": [{
"description": "Some description",
"approvals": [{
"role": "signer1",
"fields": [{
"type": "SIGNATURE",
"subtype": "FULLNAME",
"page": 0,
"top": 100.0,
"left": 100.0,
"width": 199.99978637695312,
"height": 39.99995803833008
}]
}],
"name": "First document"
}],
"name": "PYTHON CREATE"
}
{"messageKey":"error.unauthorised.noSession","packageId":null,"entity":null,"technical":null,"code":401,"message":"Failed to retrieve Session","name":"Unauthorized"}
Reply to: REST Python Example - unauthorised error
Wednesday, June 8, 2016 at 05:08amReply to: REST Python Example - unauthorised error
Wednesday, June 8, 2016 at 06:24amReply to: REST Python Example - unauthorised error
Wednesday, June 8, 2016 at 06:32am