Getting 'Invalid envelope status' resending documents through Docusign API - docusignapi

I am re-sending documents via the API. This has worked for a long time, and suddenly started getting these errors? I can't figure out what is going on? Does anyone have any ideas?
The actual envelope status is 'Waiting on Others', which of course is not in the list below, but we need to resend the envelope, because the user never got the email. So how do I deal with this?
{ "errorCode": "ENVELOPE_INVALID_STATUS",
"message": "Invalid envelope status. Envelope status is not one of: Created, Sent, Delivered, Correct." }
EnvelopesApi envelopesApi = new
EnvelopesApi(GetBasePath(myAccount.BaseUrl));
envelopesApi.Configuration.AddDefaultHeader(
"X-DocuSign-Authentication", JsonConvert.SerializeObject(myHeader));
EnvelopesApi.UpdateRecipientsOptions options = new
EnvelopesApi.UpdateRecipientsOptions();
options.resendEnvelope = "true";
envelopesApi.UpdateRecipients(myAccount.AccountId,
EnvelopeId, docuSignRecipients, options);

You're not showing what the docusignRecipients value is.
I suggest you first obtain the recipients object via EnvelopeRecipients::list and then use it in the call.
Also, at the API level, there is no envelope status of Waiting on Others. I suggest you also obtain the envelope status so you can see what is going on.
I'm sorry to hear that your code was working and then stopped. That would indicate a regression test problem. Does your code still work on demo?

Related

Outlook REST API is returning 404 for event in message

I have the following case:
I use the Outlook REST API (without any library) to visualize the users' emails - including Event invites. First, I make a call to get only the message properties and if the message has MeetingMessageType value, then another request is sent to:
https://outlook.office.com/api/v2.0/me/messages/<messageId>?$select=Microsoft.OutlookServices.EventMessage/MeetingMessageType&$expand=Microsoft.OutlookServices.EventMessage/event($select=Id,SeriesMasterId,iCalUID,Type,CreatedDateTime,LastModifiedDateTime,WebLink,Calendar,Start,End,IsAllDay,IsCancelled,Organizer,Attendees,Location,Subject,ResponseStatus,OnlineMeetingUrl,Recurrence,ResponseRequested)
to get the Event information and provide the customer with the option to respond to the invite.
The problem:
Since yesterday one of our clients reported that he can't see the event information. It turns out that the request for getting this information is returning 404.
The response body:
{
"error": {
"code": "ErrorItemNotFound",
"message": "The specified object was not found in the store., The process failed to get the correct properties."
}
}
The event is shown in the Outlook desktop mail client.
The client also shared that they have enabled ATP (advance threat protection) at his company. Not sure if this can have anything to do with the problem.
I see that other clients also have this problem.
Update:
I asked the user to try the following requests from the Outlook sandbox:
https://outlook.office.com/api/v2.0/me/messages/<messageId>
This request returns the EventMessage with "MeetingMessageType": "MeetingRequest".
Then when he tried accessing the Event:
https://outlook.office.com/api/v2.0/me/messages/<messageId>?$select=Microsoft.OutlookServices.EventMessage%2FMeetingMessageType&$expand=Microsoft.OutlookServices.EventMessage%2Fevent
The Outlook REST API returns 404.
For me, the same formatted requests work, so I can't really understand what is going on.
Please, any information will be well appreciated!

DocuSign API - Reset/Unlock RecipientAuthenticationStatus

I'm using the DocuSign API to electronically sign documents within my app. I'm using the access code authentication feature, for some additional security; however, I am trying to 'Unlock' a signer (via the API) that has input the wrong access code too many times, without voided and creating a new envelope, or using the DocuSign Admin interface.
I don't care if I have to resend the initial email, I just want to be able to conserve my client's total envelope count. It's also important (if there are multiple signers) that I don't force one signer to have to sign multiple times, if they completed their signatures prior to signer2's authentication error.
I have attempted a POST to:
/v2/accounts/{accountId}/envelopes/{envelopeId}?resend_envelope=true
I have also sought a solution using the docusign-java-client:
Recipients recipients = envelopesApi.listRecipients(accountId, envelopeId);
List<Signer> signers = recipients.getSigners();
for (Signer signer : signers) {
signer.setRecipientAuthenticationStatus(null);
}
I still get the below response
"recipientAuthenticationStatus": {
"accessCodeResult": {
"status": "Failed",
"eventTimestamp": "2018-01-15T23:49:15.8600000Z"
}
I'm able to "Resend" via the DocuSign admin GUI, and everything works as expected...
Is there any way that I'm able "reset/unlock" this authentication feature programatically, through the API?
You can use below PUT endpoint
PUT /restapi/v2/accounts/<accountId>/envelopes/<envelopeId>?resend_envelope=true
Body as:
{
}
This should send another email to the signer who failed the authentication, and that user will again get option to enter the access code.
I think you will need to delete and then re-add the recipient (signer). That makes the signer become a new recipient.
However, doing so means you'll need to re-create everything about the signer: their document tabs/fields, etc.
I can't imagine that it is less expensive to simply void/resend the envelope than to spend a developer's time to work on this issue.
If this scenario is occurring a lot, then perhaps think about providing better training to your signers with respect to using the access code feature.
Per the documentation found here
I must include the json or xml with the request (if the authentication method failed). I assumed incorrectly that if there was only one recipient, then I would NOT have to specify. If you just want to resend the envelope, you don't need to include and signer data.
Such as:
{"signers" :
[{"email":"testEmail#gmail.com",
"name":"FirstName LastName",
"recipientId":"1"
}]
}
You should then get something like the below response:
{"recipientUpdateResults":
[{
"recipientId": "1",
"errorDetails":
{
"errorCode": "SUCCESS",
"message": ""
}
}]
}

DocuSignApi - Envelope status returned as "template"

I just started suing DocuSign's sandbox to test some of the API call that I plan to use on my website. I was testing the call that returns the information about a particular template. I set up a template in my sandbox and emailed it to myself. I then tried to get the template info by making this call:
Envelope envInfo = envelopesApi.GetEnvelope(accountId, envelopeId);
In the JSON that I get back the value for "status" is "template", which is not one of the possible statuses according to DocuSign (https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Get%20Envelope%20Status%20Changes.htm). If anything it should be "Delivered". Has anyone had a similar issue? Thanks.
It was my own dumb error - I was checking the template ID instead of the envelope ID.

user can not sign because there’s no URL created and sent to us from Docusign

We are receiving the following error when I try to create a recipient view. Basically the document is sent to 2 users, one of them has already signed but the other user can not sign because there’s no URL created and sent to us from Docusign. We are using node.js docusign sdk.
var recipientView = new docusign.RecipientViewRequest();
recipientView.setReturnUrl();
recipientView.setUserName();
recipientView.setEmail(;
recipientView.setAuthenticationMethod("email");
recipientView.setClientUserId();
var envelopesApi = new docusign.EnvelopesApi();
envelopesApi.createRecipientView(accountId, envelope.id, recipientView,
function(error, viewUrl, response) {
// no url is returned here.the error (in the image) is shown
});
I printed the values of accountId, envelopeId and those seemed to be fine.I checked if the user had changed his first name, last name and there were no errors there. If I create a new user from scratch everything works fine.
FrontEnd Error
Response Error
Through your screenshots it looks like you are getting an UKNOWN_ENVELOPE_RECIPIENT error returned from the API. This means the recipient data you are sending to identify the recipient is not correct. It needs to exactly match the data you assigned to the recipient when you added them to the envelope, such as name, email, recipientId, and clientUserId.
Try calling the EnvelopeRecipients: List API before you make the request to generate the URL and ensure that the recipient data matches what you are sending in your createRecipientView() request. That should help identify which piece of data is off, once you correct that the call will then start returning the proper URL.
Also see the Embedded Signing features page in the DocuSign Developer Center which shows exactly which params you need to set etc:

SOAP requestRecipientToken - any recent API changes?

I am getting "The recipient you have identified is not a valid recipient of the specified envelope" error for new envelopeID: f3a10b34-8f37-41fd-9338-e3a48b30acec
Whereas, I receive embedded link response for previous envelopes with envelopeID: 531e6028-b246-4227-ae45-1c5ad61f89ed.
Am I doing anything wrong or this is a new issue?Can you please look into this?
Thanks!
Never mind, my mistake. I missed to set RecipientCaptiveInfo info for an envelope.

Resources