Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Working python file to create embedded echosign widget
#!/usr/bin/python
import base64
import suds
import logging
logging.basicConfig(level=logging.INFO)
logging.getLogger('suds.client').setLevel(logging.DEBUG)
url = "https://secure.echosign.com/services/EchoSignDocumentService14?wsdl"
client = suds.client.Client(url, autoblend=True)
with open('/Users/bobspryn/Desktop/flowers.pdf', 'r') as f:
read_data = f.read()
f.closed
wci = client.factory.create("ns17:WidgetCreationInfo")
fileInfo = client.factory.create("ns1:FileInfo")
fileInfo.fileName = "flowers.pdf"
fileInfo.url = "http://www.lohilabs.com/misc/flowers.pdf"
fileInfo.mimeType = None
# fileInfo.file = base64.b64encode(read_data)
fileInfoArray = client.factory.create("ns1:ArrayOfFileInfo")
fileInfoArray.FileInfo.append(fileInfo)
wci.name = "Monkeys2"
wci.signatureFlow = "SENDER_SIGNATURE_NOT_REQUIRED"
wci.fileInfos = fileInfoArray
wci.securityOptions = None
wci.callbackInfo = None
wci.widgetCompletionInfo = None
wci.widgetAuthFailureInfo = None
wci.locale = None
wci.mergeFieldInfo = None
print wci
r = client.service.createEmbeddedWidget("YOURAPIKEY", None, wci)
print r.javascript
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.