Everything is working well when using the demo API. I followed the "go live" procedure, the API key is now 'live' and I updated all the settings for production.
When creating the envelope I receive this error message :
{"errorCode"=>"ACCOUNT_LACKS_PERMISSIONS", "message"=>"This Account lacks sufficient permissions."}
I tried to set embedded argument to false on the json but apparently it's not doing anything different.
{:embedded => false,:name => "XXX yyy",:email => "XXX#yyy.com",:role_name => "PropriƩtaire", :sign_here_tabs => ... }
Any idea on how to solve this ? Thanks !
EDIT : here is the JSON request :
{
"emailBlurb": "deijzed",
"emailSubject": "dzeidjezij",
"documents": [
{
"documentId": "1",
"name": "2017-11-09_21h_50m_52s.pdf"
}
],
"recipients": {
"signers": [
{
"accessCode": "",
"addAccessCodeToEmail": false,
"customFields": null,
"idCheckConfigurationName": null,
"idCheckInformationInput": null,
"inheritEmailNotificationConfiguration": false,
"note": null,
"phoneAuthentication": null,
"recipientAttachment": null,
"requireIdLookup": null,
"roleName": "Propri\u00c3\u00a9taire",
"routingOrder": 1,
"socialAuthentications": null,
"recipientId": 1,
"email": "xxx#company.com",
"name": "xxx yyy",
"autoNavigation": false,
"defaultRecipient": false,
"signatureInfo": null,
"tabs": {
"approveTabs": null,
"checkboxTabs": [
{
}
],
"companyTabs": null,
"dateSignedTabs": [
],
"dateTabs": null,
"declineTabs": null,
"emailTabs": [
],
"envelopeIdTabs": null,
"fullNameTabs": [
],
"listTabs": [
],
"noteTabs": null,
"numberTabs": [
],
"radioGroupTabs": [
{
}
],
"initialHereTabs": [
{
}
],
"signHereTabs": [
{
}
],
"signerAttachmentTabs": null,
"ssnTabs": null,
"textTabs": [
{
}],
"titleTabs": [
],
"zipTabs": null
}
},
{
"accessCode": "",
"addAccessCodeToEmail": false,
"customFields": null,
"idCheckConfigurationName": null,
"idCheckInformationInput": null,
"inheritEmailNotificationConfiguration": false,
"note": null,
"phoneAuthentication": null,
"recipientAttachment": null,
"requireIdLookup": null,
"roleName": "company",
"routingOrder": 2,
"socialAuthentications": null,
"recipientId": 2,
"email": "xxx#yyy.com",
"name": "xxx yyy",
"autoNavigation": false,
"defaultRecipient": false,
"signatureInfo": null,
"tabs": {
"approveTabs": null,
"checkboxTabs": [
],
"companyTabs": null,
"dateSignedTabs": [
{
}
],
"dateTabs": null,
"declineTabs": null,
"emailTabs": [
],
"envelopeIdTabs": null,
"fullNameTabs": [
],
"listTabs": [
],
"noteTabs": null,
"numberTabs": [
],
"radioGroupTabs": [
],
"initialHereTabs": [
{
}
],
"signHereTabs": [
{
}
],
"signerAttachmentTabs": null,
"ssnTabs": null,
"textTabs": [
],
"titleTabs": [
],
"zipTabs": null
}
}
],
"carbonCopies": [
]
},
"eventNotification": {
"useSoapInterface": false,
"includeCertificateWithSoap": false,
"url": "xxxxx",
"loggingEnabled": true,
"envelopeEvents": [
],
"recipientEvents": [
{
"includeDocuments": true,
"recipientEventStatusCode": "Completed"
}
]
},
"status": "sent",
"customFields": null
}
I can see you are using "eventNotification", so can you please check if DocuSign connect is supported in your subscription/plan which you bought with DocuSign. If its not available then you need to contact your DocuSign Account Manager for enabling this feature.
The issue was on my side : the API endpoint to be used for European accounts is not www.docusign but eu.docusign
Thanks again for your help
Related
While calling the create envilope API we are getting the error
{
"errorCode": "ACCOUNT_MISSING_ENTITLEMENT_CREATE_EMBEDDEDRECIPIENTSTARTURL",
"message": "The sender does not have required entitlement and is not allowed to set EmbeddedRecipientStartURL for the user"
}
Request url
/v2/accounts/8017620c-2355-481c-a7b2-50b645d40a52/envelopes
Request body (envelope)
{
"documents": [
{
"documentId": "1864177648",
"name": "powerpoint press.pptx",
"fileExtension": "pptx",
"matchBoxes": [],
"documentFields": [],
"documentBase64": ""
}
],
"recipients": {
"signers": [
{
"excludedDocuments": [],
"name": "Mehraj",
"email": "mehraj#mydomain.com",
"signingGroupUsers": [],
"recipientId": "cbd343d7-a735-4846-8138-243ec7b31348",
"socialAuthentications": [],
"clientUserId": "0e670c86-aa1a-4149-9ce6-9c27dd76d3b0",
"embeddedRecipientStartURL": "SIGN_AT_DOCUSIGN",
"customFields": [],
"routingOrder": "1",
"recipientAttachments": []
}
],
"agents": [],
"editors": [],
"intermediaries": [],
"carbonCopies": [],
"certifiedDeliveries": [],
"inPersonSigners": []
},
"eventNotification": {
"url": "https://mysite.mydomain.com/root/api/docusign/webhook/eventnotification",
"loggingEnabled": "true",
"requireAcknowledgment": "true",
"envelopeEvents": [
{
"envelopeEventStatusCode": "sent"
},
{
"envelopeEventStatusCode": "delivered"
},
{
"envelopeEventStatusCode": "completed"
},
{
"envelopeEventStatusCode": "declined"
},
{
"envelopeEventStatusCode": "voided"
}
],
"recipientEvents": [
{
"recipientEventStatusCode": "Sent"
},
{
"recipientEventStatusCode": "Completed"
},
{
"recipientEventStatusCode": "Declined"
},
{
"recipientEventStatusCode": "AuthenticationFailed"
},
{
"recipientEventStatusCode": "AutoResponded"
}
],
"useSoapInterface": "false",
"includeCertificateWithSoap": "false",
"signMessageWithX509Cert": "false",
"includeDocuments": "false",
"includeEnvelopeVoidReason": "true",
"includeTimeZone": "true",
"includeSenderAccountAsCustomField": "true",
"includeDocumentFields": "true",
"includeCertificateOfCompletion": "false"
},
"templateRoles": [],
"compositeTemplates": [],
"status": "created",
"emailSubject": "powerpoint press",
"recipientsLock": "true"
}
** I have removed the documentBase64 contennts to make the post shorter **
In demo environment everything works fine, but in the production environment we are getting the specified error.
Setting the embedded start URL is a paid add-on feature. Your production account probably didn't include this feature.
Need to see your envelope before I can give you a complete answer but this page will likely shed light on what you maybe missing:
https://developers.docusign.com/docs/esign-soap-api/reference/sending-group/rules-for-createandsendenvelope-and-createenvelope/
Let me know if this helps.
I'm using DocuSign REST API CreateEnvelope.
I have a PDF with form fields that I have to upload to DocuSign.
I'm using the PDF form field transformation to transform the PDF fields in to DocuSign tabs and assign them to different signers.
This works fine for Signature and Initial fields but I don't see any DateSigned tab in the document.
Note the names of the PDF form fields match exactly the tabLabel values of the corresponding DocuSign tabs.
Here is the JSON payload:
{
"attachments": [],
"compositeTemplates": [
{
"document": {
"documentBase64": "...",
"documentFields": [],
"documentId": "1",
"matchBoxes": [],
"name": "E54.000003631.000009458.0000001.pdf",
"transformPdfFields": "true"
},
"inlineTemplates": [
{
"documents": [],
"recipients": {
"agents": [],
"carbonCopies": [],
"certifiedDeliveries": [],
"editors": [],
"inPersonSigners": [],
"intermediaries": [],
"signers": [
{
"customFields": [],
"documentVisibility": [],
"email": "[replace this with a valid email]",
"excludedDocuments": [],
"name": "Recip_2",
"recipientAttachments": [],
"recipientId": "2",
"recipientSignatureProviders": [],
"routingOrder": "1",
"signingGroupUsers": [],
"socialAuthentications": [],
"tabs": {
"approveTabs": [],
"checkboxTabs": [],
"companyTabs": [],
"dateSignedTabs": [
{
"documentId": "1",
"recipientId": "2",
"tabLabel": "S2_DocuSignDateSigned"
}
],
"dateTabs": [],
"declineTabs": [],
"emailAddressTabs": [],
"emailTabs": [],
"envelopeIdTabs": [],
"firstNameTabs": [],
"formulaTabs": [],
"fullNameTabs": [],
"initialHereTabs": [
{
"documentId": "1",
"recipientId": "2",
"tabLabel": "S2_DocuSignInitialHere"
}
],
"lastNameTabs": [],
"listTabs": [],
"noteTabs": [],
"numberTabs": [],
"radioGroupTabs": [],
"signerAttachmentTabs": [],
"signHereTabs": [
{
"documentId": "1",
"recipientId": "2",
"tabLabel": "PdfField_5"
}
],
"ssnTabs": [],
"textTabs": [],
"titleTabs": [],
"viewTabs": [],
"zipTabs": []
}
},
{
"customFields": [],
"documentVisibility": [],
"email": "[replace this with a valid email]",
"excludedDocuments": [],
"name": "Recip_1",
"recipientAttachments": [],
"recipientId": "1",
"recipientSignatureProviders": [],
"signingGroupUsers": [],
"socialAuthentications": [],
"tabs": {
"approveTabs": [],
"checkboxTabs": [],
"companyTabs": [],
"dateSignedTabs": [
{
"documentId": "1",
"recipientId": "1",
"tabLabel": "PdfField_3_DocuSignDateSigned"
}
],
"dateTabs": [],
"declineTabs": [],
"emailAddressTabs": [],
"emailTabs": [],
"envelopeIdTabs": [],
"firstNameTabs": [],
"formulaTabs": [],
"fullNameTabs": [],
"initialHereTabs": [
{
"documentId": "1",
"recipientId": "1",
"tabLabel": "PdfField_2_DocuSignInitialHere"
}
],
"lastNameTabs": [],
"listTabs": [],
"noteTabs": [],
"numberTabs": [],
"radioGroupTabs": [],
"signerAttachmentTabs": [],
"signHereTabs": [
{
"documentId": "1",
"recipientId": "1",
"tabLabel": "PdfField_1"
}
],
"ssnTabs": [],
"textTabs": [
{
"documentId": "1",
"recipientId": "1",
"tabLabel": "PdfField_4"
}
],
"titleTabs": [],
"viewTabs": [],
"zipTabs": []
}
}
]
},
"sequence": "1"
}
],
"serverTemplates": []
}
],
"documents": [],
"emailBlurb": "Please review attached document(s) for electronic signature.",
"emailSubject": "Please review attached document for electronic signature",
"recipients": {
"agents": [],
"carbonCopies": [],
"certifiedDeliveries": [],
"editors": [],
"inPersonSigners": [],
"intermediaries": [],
"signers": []
},
"status": "sent",
"templateRoles": []
}
What am I missing?
Thanks for your help!
I found what was wrong.
The initial PDF (generated by our produced) contained only PDF fields of type Signature.
We have updated the PDF generation to have:
PDF fields of type Signature for the SignHere and InitialHere DocuSign tabs
PDF fields of type Text for the DateSigned and Text DocuSign tabs
Now all PDF Fields are correctly converted and the corresponding DocuSign tab is added to the document.
I created templates in Docusign.
I call the REST API to generate a new enveloppe using these templates.
Code works fine:
Signers get populated
Fields get populated
But I cant get the Phone Authentication to work. I checked other code on the DocuSign website and here.
The only differences I can see:
Different number of parameters: I tried with and without (recordVoicePrint=false,validateRecipProvidedNumber=false), it does'nt change the outcome
I call a template instead of sending the Base64 doc like in other examples
Here is the JSON request:
{
"templateRoles": [
{
"tabs": {
"textTabs": [
{
"value": "Some Name",
"tabLabel": "CustName"
},
{
"value": "315750.00",
"tabLabel": "TotEqptCost"
}
]
},
"roleName": "Signer",
"requireIdLookup": true,
"phoneAuthentication": {
"senderProvidedNumbers": [
"(222) 222-2222"
],
"recipMayProvideNumber": false
},
"name": "James",
"idCheckConfigurationName": "Phone Auth $",
"email": "James#gmail.com"
},
{
"tabs": {
"textTabs": [
{
"value": "Dome Name",
"tabLabel": "CustName"
},
{
"value": "315750.00",
"tabLabel": "TotEqptCost"
}
]
},
"roleName": "Signer2",
"requireIdLookup": true,
"phoneAuthentication": {
"senderProvidedNumbers": [
"+1 (111) 111-1111"
],
"recipMayProvideNumber": false
},
"name": "Joe",
"idCheckConfigurationName": "Phone Auth $",
"email": "Joe#thing.com"
}
],
"templateId": "a315793d-896f-41b4-9c61-dfc6873bc6f3",
"status": "created",
"emailSubject": "Testing"
}
It seems you are entering phone number in wrong format, try below json snippet:
{
"signers": [
{
"name": "Test Name",
"email": "testemail+name#gmail.com",
"roleName": "Signer 1",
"routingOrder": 1,
"recipientId": "1",
"requireIdLookup": true,
"idCheckConfigurationName": "Phone Auth $",
"phoneAuthentication": {
"recipMayProvideNumber": false,
"senderProvidedNumbers": [
"+18889619998"
]
}
}
]
}
I was able to resolve my issue by using the Composite Templates. See code below.
{
"compositeTemplates": [
{
"compositeTemplateId": "1",
"inlineTemplates": [
{
"recipients": {
"signers": [
{
"email": "James#gmail.com",
"name": "James",
"roleName": "Signer",
"recipientId": "1",
"requireIdLookup": true,
"phoneAuthentication": {
"senderProvidedNumbers": [
"(222) 222-2222"
],
"recipMayProvideNumber": false
},
"idCheckConfigurationName": "Phone Auth $",
"tabs": {
"textTabs": [
{
"value": "Some Name",
"tabLabel": "CustName"
},
{
"value": "315750.00",
"tabLabel": "TotEqptCost"
}
]
}
},
{
"email": "John#company.com",
"name": "John",
"recipientId": "2",
"requireIdLookup": true,
"phoneAuthentication": {
"senderProvidedNumbers": [
"(222) 222-2222"
],
"recipMayProvideNumber": false
},
"idCheckConfigurationName": "Phone Auth $",
"roleName": "Signer2",
"tabs": {
"textTabs": [
{
"value": "Some Name",
"tabLabel": "CustName"
},
{
"value": "315750.00",
"tabLabel": "TotEqptCost"
}
]
}
}
]
},
"sequence": "1"
}
],
"serverTemplates": [
{
"sequence": "1",
"templateId": "a315793d-896f-41b4-9c61-dfc6873bc6f3"
}
]
},
],
"status": "created",
"emailSubject": "Testing"
}
Is it necessary to send out an eMail to recipients to fill a template with tabs?
At the moment I create an envelope with status=sent that will obviously sent the filled documents to recipients. I would not like to send the document's, when creating.
If I use status=created the preview shows just empty documents. The templates are not filled with the tabs and not send.
How can I preview, but not sent an eMail. And sent when I think I am ready. In total the recipient would just get on eMail to sign their documents.
{
"emailSubject": "DocuSign: Multi Document",
"status": "sent",
"eventNotification": {
"url": "http://fake.com",
"envelopeEvents": [
{
"envelopeEventStatusCode": "Completed"
}
],
"recipientEvents": [
{
"recipientEventStatusCode": "Completed"
}
]
},
"brandId": "11111-my-brand-id---1111",
"compositeTemplates": [
{
"serverTemplates": [
{
"sequence": 1,
"templateId": "myTemplate-id-1"
}
],
"inlineTemplates": [
{
"sequence": 1,
"recipients": {
"signers": [
{
"email": "adv+docusign#test.test",
"name": "Dev",
"recipientId": 1,
"roleName": "Advisor",
"tabs": {
"textTabs": [
{
"tabLabel": "Subscription_Amount",
"value": "100000",
"documentId": 1
}
],
"radioGroupTabs": []
}
}
]
}
}
]
},
{
"serverTemplates": [
{
"sequence": 2,
"templateId": "myTemplate-id-2"
}
],
"inlineTemplates": [
{
"sequence": 2,
"recipients": {
"signers": [
{
"email": "adv+docusign#test.test",
"name": "Dev",
"recipientId": 1,
"roleName": "Advisor",
"tabs": {
"textTabs": [
{
"tabLabel": "Subscription_Amount",
"value": "100000",
"documentId": 1
}
],
"radioGroupTabs": []
}
}
]
}
}
]
},
{
"serverTemplates": [
{
"sequence": 3,
"templateId": "myTemplate-id-3"
}
],
"inlineTemplates": [
{
"sequence": 3,
"recipients": {
"signers": [
{
"email": "other+docusign#test.test",
"name": "Dev",
"recipientId": 1,
"roleName": "Other",
"tabs": {
"textTabs": [
{
"tabLabel": "Subscription_Amount",
"value": "100000",
"documentId": 1
}
],
"radioGroupTabs": []
}
}
]
}
}
]
}
]}
Sending (short version)
{
emailSubject: 'DocuSign: Multi Document',
status: 'sent',
eventNotification:
exports {
url: 'https://host/o/fsg11/hook',
envelopeEvents: [ [Object] ],
recipientEvents: [ [Object] ] },
brandId: 'brand-id',
compositeTemplates:
[ { serverTemplates: [Object], inlineTemplates: [Object] },
{ serverTemplates: [Object], inlineTemplates: [Object] },
{ serverTemplates: [Object], inlineTemplates: [Object] } ]
}
Receiving
{
envelopeId: 'envelope-id',
status: 'sent',
statusDateTime: '2017-06-13T01:10:08.3100000Z',
uri: '/envelopes/envelope-id'
}
Please make sure the tabLabel, recipientId and documentId match the server templates values. The tabs should be created successfully once those values are correct.
You can obtain those values using the listTemplateDocuments && listTemplateRecipients apis.
For documentId
GET https://demo.docusign.net/v2/accounts/{accountId}/templates/{templateId}/documents
For tabLabel, recipientId
GET https://demo.docusign.net/v2/accounts/{accountId}/templates/{templateId}/recipients?include_tabs=true
We're developing a multi-tenant SSO integration with Office 365 using the new OpenID implementation.
Once the access token has been retrieved, we call https://graph.windows.net/me?api-version=1.21-preview to get the user's profile information which gives something like the below - great.
{
"odata.metadata": "https:\/\/graph.windows.net\/myorganization\/$metadata#directoryObjects\/Microsoft.WindowsAzure.ActiveDirectory.User\/#Element",
"odata.type": "Microsoft.WindowsAzure.ActiveDirectory.User",
"objectType": "User",
"objectId": "GUID",
"accountEnabled": true,
"assignedLicenses": [
],
"assignedPlans": [
],
"city": null,
"country": null,
"department": null,
"dirSyncEnabled": null,
"displayName": "Tester A",
"facsimileTelephoneNumber": null,
"givenName": "Test",
"immutableId": null,
"jobTitle": null,
"lastDirSyncTime": null,
"mail": null,
"mailNickname": "tester-a",
"mobile": null,
"otherMails": [
],
"passwordPolicies": "None",
"passwordProfile": null,
"physicalDeliveryOfficeName": null,
"postalCode": null,
"preferredLanguage": null,
"provisionedPlans": [
],
"provisioningErrors": [
],
"proxyAddresses": [
],
"state": null,
"streetAddress": null,
"surname": "A",
"telephoneNumber": null,
"usageLocation": null,
"userPrincipalName": "tester-a#test.onmicrosoft.com",
"userType": "Member"
}
However, it doesn't seem to return any identifier or specific domain for the organization - other than the domain contained in the userPrincipalName field. Is there a better way to identify the organization (considering the organization may update test.onmicrosoft.com to a custom domain of test.microsoft.com)?
Indeed. Use the tenantDetails API (https://graph.windows.net/{tenantDomain}/tenantDetails?api-version={version}), to get the display name of the directory and all verified domains associated with it. Documented here: http://msdn.microsoft.com/en-us/library/azure/hh974467.aspx.
Below is the trimmed output for my tenant.
Hope this helps.
{
"odata.metadata": "https://graph.windows.net/dushyantgill.com/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.TenantDetail",
"value": [
{
"odata.type": "Microsoft.WindowsAzure.ActiveDirectory.TenantDetail",
"objectType": "Company",
"objectId": "62e173e9-301e-423e-bcd4-29121ec1aa24",
"assignedPlans": [
{
"assignedTimestamp": "2013-09-17T01:01:58Z",
"capabilityStatus": "Enabled",
"service": "SharePoint",
"servicePlanId": "a1f3d0a8-84c0-4ae0-bae4-685917b8ab48"
} [SNIP]
],
"city": "Redmond",
"companyLastDirSyncTime": "2014-04-20T17:42:58Z",
"country": null,
"countryLetterCode": "US",
"dirSyncEnabled": true,
"displayName": "dushyantgill",
"marketingNotificationEmails": [],
"postalCode": "98052",
"preferredLanguage": "en",
"provisionedPlans": [
{
"capabilityStatus": "Enabled",
"provisioningStatus": "Success",
"service": "exchange"
}[SNIP]
],
"provisioningErrors": [],
"state": "WA",
"street": "[SNIP]",
"technicalNotificationMails": [
"[SNIP]"
],
"telephoneNumber": null,
"tenantType": null,
"verifiedDomains": [
{
"capabilities": "Email, OfficeCommunicationsOnline",
"default": false,
"id": "0005000080186A52",
"initial": false,
"name": "dushyantgill.mail.onmicrosoft.com",
"type": "Managed"
},
{
"capabilities": "Email, OfficeCommunicationsOnline",
"default": false,
"id": "00057FFE803C0EDA",
"initial": false,
"name": "dushyantgill.org",
"type": "Federated"
},
{
"capabilities": "Email, OfficeCommunicationsOnline",
"default": true,
"id": "00053FFF80232F54",
"initial": false,
"name": "dushyantgill.com",
"type": "Managed"
}[SNIP]
]
}
]
}