How to use the docusign-esign.ReturnUrlRequest function in docusign-esign

To help you get started, we’ve selected a few docusign-esign examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github docusign / docusign-node-client / test / Recipes / CoreRecipes.js View on Github external
envelopeId = envelopeSummary.getEnvelopeId();
          console.log('EnvelopeSummary: ' + JSON.stringify(envelopeSummary));

          // ===============================================================================
          // Step 3:  Create SenderView API
          // ===============================================================================
          // use the |accountId| we retrieved through the Login API
          var loginAccount = new docusign.LoginAccount();
          loginAccount = loginAccounts[0];
          var accountId = loginAccount.accountId;

          // instantiate a new EnvelopesApi object
          var envelopesApi = new docusign.EnvelopesApi();

          // set the url where you want the sender to go once they are done editing/sending the envelope
          var returnUrl = new docusign.ReturnUrlRequest();
          returnUrl.setReturnUrl('https://www.docusign.com/devcenter');

          // call the createEnvelope() API
          envelopesApi.createSenderView(accountId, envelopeId, returnUrl, function (error, senderView, response) {
            if (error) {
              console.log('Error: ' + error);
              return;
            }

            if (senderView) {
              console.log('ViewUrl: ' + JSON.stringify(senderView));
            }
          });
        }
      });
    }