adobe sign api get e signature from user in web form without document

you can use the Adobe Sign API to get an e-signature from a user in a web form without uploading a document. Here's an example workflow you could use:

  1. Create a new agreement with the necessary options, such as the name of the agreement, a message to the signer, and the email address of the signer.
  2. Generate a signing URL for the agreement.
  3. Embed the signing URL in an iframe or redirect the user to the URL.
  4. The signer will be prompted to provide their signature and any other required information.
  5. After the signer has completed the signing process, you can use the Adobe Sign API to retrieve the signed agreement.

Here's some sample code to get you started:

 

// Load the Adobe Sign SDK script
var sdkUrl = 'https://secure.echosign.com/public/docs/1.0/AdobeSign.js';
$.getScript(sdkUrl, function() {

  // Initialize the Adobe Sign API with your API credentials and access token
  adobeSign.init({
    clientId: 'YOUR_CLIENT_ID',
    redirectUri: 'YOUR_REDIRECT_URI',
    scope: 'user_login:self+agreement_send:self',
    accessToken: 'YOUR_ACCESS_TOKEN'
  });

  // Create a new agreement
  var agreement = adobeSign.createAgreement({
    fileInfos: [],
    name: 'My Agreement',
    message: 'Please sign this agreement.',
    recipientSetInfos: [{
      recipientSetMemberInfos: [{
        email: 'jane.doe@example.com',
        fax: '',
        securityOption: 'NONE'
      }],
      recipientSetRole: 'SIGNER'
    }]
  });

  // Generate a signing URL for the agreement
  agreement.getSigningUrl().then(function(url) {
    // Embed the signing URL in the web form
    var signatureContainer = document.getElementById('signatureContainer');
    signatureContainer.innerHTML = '<iframe src="' + url + '" width="500" height="300"></iframe>';
  }).catch(function(err) {
    console.error('Error generating signing URL:', err);
    alert('Error generating signing URL: ' + err.message);
  });

});

 

Note that you'll need to replace YOUR_CLIENT_ID, YOUR_REDIRECT_URI, YOUR_ACCESS_TOKEN, jane.doe@example.com, and the recipient information with your own values. The fileInfos array is empty, indicating that no document is being uploaded. Instead, the name and message fields are used to specify the name of the agreement and the message to the signer. The recipientSetInfos array is used to specify the email address of the signer. The code above embeds the signing URL in an iframe with a width of 500px and a height of 300px, but you can adjust these values as needed to fit your web form.


Tags:

Share:

Related posts