get-signing-url

Getting the signing URL becomes useful for scenarios involving in-person signing. Load the signing URL in a browser window on a mobile device and get the agreement signed in-person.

Before you begin, ensure that you have included the appropriate JavaScript files as shown below:

<script src="js/adobe-sign-sdk.js"></script>
<script src="vendor/superagent.min.js"></script>
<script src="vendor/validator.min.js"></script>

To get the signing URL of an agreement, use AgreementsApi.getSigningUrl()method as follows:

//Get the context
var context = new AdobeSignSdk.Context();

//Know the Agreement ID        
var agreementId = "3AAABLblqZhBr56arg-8YqWwYNOTTHEREALIDKAoWm";        

//Initialize the Agreements API        
var agreementsApi = new AdobeSignSdk.AgreementsApi(context);        

var headerParams = {"accessToken": "3AAABLNOTTHEREALTOKENQ1h9rUKe"};

//Invoke the API        
agreementsApi.getSigningUrl(headerParams, agreementId)                
             .then(function (signingUrlResponse) {                   
                 //Returning the list of the URLs                    
                 var signingUrlSetInfos = signingUrlResponse.getSigningUrlSetInfos();                    

                 for (var i = 0; i < signingUrlSetInfos.length; i++) {                        
                    var signingUrls = signingUrlSetInfos[i].getSigningUrls();                        
                    for (var j = 0; j < signingUrls.length; j++) {                            
                        var signingUrl = signingUrls[j];                            
                        console.log("Signing url: " + signingUrl.getEsignUrl());                        
                    }                    
                }                
             })                
             .catch(function (apiError) {                    
                console.log(apiError);                
             });