Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to send instant reminder email to pending recipients through DocuSign API #461

Open
pradeepkmr88 opened this issue Dec 11, 2024 · 2 comments

Comments

@pradeepkmr88
Copy link

Hi, could you please advise here. I want to send instant reminder email to pending recipients using below request. but I am getting 400 error "bad request".

Method:PUT, RequestUri: 'https://demo.docusign.net/restapi/v2/accounts/{AccountId}/envelopes/{envelopeId}?resend_envelope=true', Version: 1.1, Content: , Headers:
{
Accept: application/json
X-DocuSign-Authentication: {"Username":"xx", "Password":"xx", "IntegratorKey":"xx"}
}

@InbarGazit
Copy link
Member

The code above uses legacy authentication, you need to use OAuth 2.0 with an access token and do NOT use X-DocuSign-Authentication

@pradeepkmr88
Copy link
Author

pradeepkmr88 commented Dec 13, 2024

Hi Inbar,

Thanks for your response !.

I tried with OAuth 2.0 access with below code. But still, I am not able to send instant reminder email.

If I am setting reminderDelay = "1", reminderFrequency = "1" then it is sending reminder email after 24hr. But we need to send reminder email on user request.

string apiUrl = $"https://demo.docusign.net/restapi/v2.1/accounts/{accountId}/envelopes/{envelopId}? resend_envelope=true";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken);
string reminderApiUrl = $"{apiUrl}";
var reminderRequest = new
{
reminderEnabled = "true",
reminderDelay = "0",
reminderFrequency = "0"
};
string reminderJson = Newtonsoft.Json.JsonConvert.SerializeObject(reminderRequest);
StringContent reminderContent = new StringContent(reminderJson, Encoding.UTF8, "application/json");
HttpResponseMessage reminderResponse = await client.PutAsync(reminderApiUrl, reminderContent);

Is there POST API for send reminder email? I found this one post API but it's not working. ([https://demo.docusign.net/restapi/v2/accounts/{{accountId}}/envelopes/{{EnvelopeId}}/reminders])

Please suggest on this. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants