given a demo docusign account with a template, through the api i have created a group with default permission profile of "Docusign Sender" and created a user profile and a membership to the group. using the new user profiles creds (and the account id of the parent docusign account), i can fetch templates shared by the docusign account but i cannot create an envelope from such a template. the error message received is:
USER_LACKS_PERMISSIONS : This user lacks sufficient permissions to access this resource
i can post more details if necessary but perhaps this is a well-known behavior that i just have been unable to resolve through researching the api and stackoverflow.
We discussed that you are using REST to grab shared templates to create envelopes.
When creating a user profile from API those users do not have the correct permission set. When creating the same user from the web console it works. One suggestion might be to grab the permission set of an known good user and compare it to the profile obtained from a user created by your API request:
https://www.docusign.com/p/RESTAPIGuide/RESTAPIGuide.htm#REST%20API%20References/Get%20Use%20Profile.htm?Highlight=profile
https://www.docusign.com/p/RESTAPIGuide/RESTAPIGuide.htm#REST%20API%20References/Get%20Group%20Information.htm
it seems this particular error message is what happens when a user profile attempts to create an envelope (at least from a template in this case) while specifying a bccEmailAddresses recipient under emailSettings. if this bcc recipient is removed, envelope creation succeeds. of course, specifying a bcc recipient is no problem using the parent account's credentials.
Related
Using the REST API for remote signing and it's been working great for about a year now.
We have a user of our system that wants to send documents for e-signature, and I'd like to limit their access to their own documents, let them get the notifications of document completion, etc.
I know I can create additional users in the admin section but I'm not sure of where to look from there. Is any of the rest possible?
Yes, add the person as a regular (not admin) sender in your DocuSign account. They'll only be able to see envelopes (transactions) that they sent.
They can also see envelopes that were explicitly shared with them by another sender
Added: authenticate as a different person
Your API application sends envelopes by using the credentials of an account member. If this is a non-person such as "finance#yourCompany.com" then we call that a "system user."
Your question was how to send envelopes from a sender who is not an administrator. The answer is to authenticate to the DocuSign API as that person. This can be done with the OAuth JWT or Authorize Code grant flows.
Ask a new question if you have more questions on how to do this.
When using the Docusign API (in my case, via the Sandbox/demo env), in the signing view at the top of the screen it displays the name & company of the user account that was used to authenticate with the API.
However, because this is embedded signing from my app, I would have thought we'd only have one user account - for the app. So I want to change what appears at the top there - the information on the sender of the envelope. Either to be the user account that exists in my app that created the envelope, or just to state what company sent the document.
Are there options on the API to do this? I can't see any reference to anything like this in the envelopeDefinition JSON structure in the REST API docs.
You can use the DocuSign SOBO - Send On Behalf Of Functionality
The Send On Behalf Of feature permits automated sending through the API by one account user on behalf of another account user.
More information here
I'm testing the Docusing API using the Dev Sandbox and I get the following error when I try to create an envelope with an embedded editor:
{
"errorCode": "EDITOR_MUST_HAVE_ACCOUNT",
"message": "The recipient Editor must be an existing DocuSign account member."
}
I'm defining the email, name, clientUserId and recipientId parameters using my Sandbox account data, which works properly if I add and agent recipient instead of an editor one.
I guess it might be a limitation of the Sandbox account, but can't find any information about it.
Update: if I add the editor recipient without specifying a clientUserId, the envelope is created correctly, so the problem may be related to that. I've already checked that the SignerMustHaveAccount and SignerMustLoginToSign options are false.
P.S. We are trying to integrate the Docusing API in our system: we want to let our clients use the embedded sender feature, but we don't want them to be able to see the envelopes of other customers when they get logged in. We can't create one account per customer either, so I thought we could achieve our goal by having one user to create the envelopes (through API calls in our code) and another user to edit them as an editor recipient using the embedded feature. Am I right?
A followup to a question answered here regarding changing the email address of a user via the REST API:
DocuSign REST API, change account's email address? (ie, the users login name)
If, instead, we created a second docusign user login with a new email address and wanted to move all envelopes from the old user to the new user, what is the most efficient way to do this? Both users would be under the same parent docusign account.
Currently, I do not see an endpoint to move an envelope between users.
Does this entail downloading all envelopes, and then sending on behalf of them all (from parent to child account) to put the documents into the newly created user's account?
Interestingly, I see that the error ENVELOPE_TRANSFEREE_ALREADY_OWNS_ENVELOPE is documented in the REST API guide (https://08d1d92f490618f41c65-8fb00e97ac499a7066a18ce9c66b019b.ssl.cf2.rackcdn.com/REST_API_Guide_v2.pdf), but yet the guide contains no obvious documentation of a related REST API operation (i.e., one that would enable you to transfer ownership of an envelope).
With the SOAP API, you can use the TransferEnvelope operation (page 178: https://10226ec94e53f4ca538f-0035e62ac0d194a46695a3b225d72cc8.ssl.cf2.rackcdn.com/soap-api-guide.pdf) to transfer an envelope from one user to another.
Based on the fact that "TransferEnvelope" is missing from this list of all SOAP API operations that are supported in the REST API, I'd suspect that Transferring Envelopes isn't (yet) supported via the REST API:
https://www.docusign.com/p/RESTAPIGuide/RESTAPIGuide.htm#Appendix/DocuSign API to REST API.htm
The DocuSign account created is by an individual, but when using the DocuSign API to generate an envelope from a template and sending to a receiver, the name and email address of the account holder shows up instead of the company the user works for.
Is there a way to show company name and official company email instead of the account user's name/email?
The name and email address corresponding to the sending DocuSign user account will always be shown on/for sent envelopes. That being said, there's an easy way to achieve what you describe:
Create another "user" (i.e., membership) within the same DocuSign account -- this will represent the "system sender" user account -- i.e., the user account that you'll specify when sending envelopes with the API.
When creating the new "user", set name and email address to the values that you want to see/use for envelopes you send via the API.
Make sure to grant the new "user" the appropriate API-related settings (under the DocuSign API heading when viewing User Permissions).
Use the "system sender user" credentials to send envelopes via the API.
Keep in mind that when using this "system sender" user to send envelopes via the API, that user will be considered the sender of each envelope sent using that account's credentials -- which means that only that user's credentials can be used via the DocuSign web console to access the DocuSign envelope for viewing/correcting/etc. Other members of that same DocuSign account won't be able to access the envelope via the DocuSign web console unless you explicitly grant 'folder sharing' rights between users.