How to use the docusign-esign.ConsoleViewRequest 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
console.log('LoginInformation: ' + JSON.stringify(loginAccounts));

      // ===============================================================================
      // Step 2:  Create ConsoleView 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 user to go once they logout of the Console
      var returnUrl = new docusign.ConsoleViewRequest();
      returnUrl.setReturnUrl('https://www.docusign.com/devcenter');

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

        if (consoleView) {
          console.log('ConsoleView: ' + JSON.stringify(consoleView));
        }
      });
    }
  });
}; // end EmbeddedConsole()