Adobe sign api get e signature from sender
To get an e-signature from the sender using the Adobe Sign API, you can follow these general steps:
Here's some sample code to get you started:
JavaScript code to handle the process:
// 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({
documentURL: 'DOCUMENT_URL',
senderEmail: 'SENDER_EMAIL',
senderName: 'SENDER_NAME',
signatureType: 'ESIGN',
signatureFlow: 'SENDER_SIGNATURE_REQUIRED',
name: 'My Agreement',
message: 'Please sign this agreement.'
});
// Generate a signing URL for the agreement
agreement.getSigningUrl().then(function(url) {
// Redirect the sender to the signing URL
window.location.href = url;
}).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, and YOUR_ACCESS_TOKEN with your own values. You'll also need to adjust the documentURL, senderEmail, senderName, and other options passed to the createAgreement() method to fit your specific use case.