signnow / SignNow.NET

SignNow.Net is the official .NET 4.5+ and .NET Standard class library for the SignNow API. SignNow allows you to embed legally-binding e-signatures into your app, CRM or cloud storage. Send documents for signature directly from your website. Invite multiple signers to finalize contracts.
https://www.signnow.com/developers
MIT License
16 stars 12 forks source link

Redirect link on embedded invites #160

Closed edencorbin closed 2 weeks ago

edencorbin commented 2 months ago

Its not clear to me where I can add this, so that upon signing it redirects, here its not an option:


        {
            var document = await signNowContext.Documents.GetDocumentAsync(documentId);
            // create embedded signing invite
            var invite = new EmbeddedSigningInvite(document);

            invite.AddEmbeddedSigningInvite(
                new EmbeddedInvite
                {
                    Email = email,
                    RoleId = document.Roles[0].Id,
                    SigningOrder = 1,
                    AuthMethod = EmbeddedAuthType.None
                });

            return await signNowContext.Invites.CreateInviteAsync(document.Id, invite)
                .ConfigureAwait(false);
        }```

Nor is it an option here: 

```        public async Task<EmbeddedInviteLinkResponse> GenerateLinkForEmbeddedInvite(string documentId, int expires, SignNowContext signNowContext)
        {
            var document = await signNowContext.Documents.GetDocumentAsync(documentId);
            var options = new CreateEmbedLinkOptions
            {
                FieldInvite = document.FieldInvites.First(),
                AuthMethod = EmbeddedAuthType.None,
                LinkExpiration = (uint)expires
            };

            return await signNowContext.Invites
                .GenerateEmbeddedInviteLinkAsync(document.Id, options).ConfigureAwait(false);
        }```   to be clear these methods are working but I am not able to redirect the user on completion.
futhermore listening to an ebedded iframe I dont get any events on completion.
AlexNDRmac commented 2 months ago

Hi @edencorbin These SDK methods were implemented when no redirect abilities existed via API. So, right now signNow API have an options to configure redirects as you wish.

According to documentation, we have some options:


redirect_uri The link that opens after the signing session has been completed.

decline_redirect_uri The link that opens after the signing session has been declined by the signer.

close_redirect_uri The link that opens after a signer selects the Close button.

redirect_target Determines whether to open the redirect link in the new tab in the browser, or in the same tab after the signing session. Possible values: blank - opens the link in the new tab, self - opens the link in the same tab, default value.


I can add these options to EmbeddedInvite model, so you'll be able to set these properties as described above.