$(document).ready(function () {
debugger;
$.ajax({
type: "GET",
headers: {
"Accept" : "application/json",
"Content-Type": "application/json"
},
beforeSend: function (request) {
// request.setRequestHeader("X-DocuSign-Authentication"
// , "<DocuSignCredentials><Username>*******</Username><Password>****** </Password> <IntegratorKey>******</IntegratorKey></DocuSignCredentials>");
request.setRequestHeader("X-DocuSign-Authentication"
,"{\"Username\":\"********\",\"Password\":\"*****\",\"IntegratorKey\":\"*******\"}");
},
url: "https://demo.docusign.net/restapi/v2/login_information? api_password=false&include_account_id_guid=tr...
success: function (r) {
debugger;
},
error: function (xhr) {
alert(xhr.responseText);
}
});
});
I am using above to login, I get response code 200.. But response is always blank .Even if I give wrong password, still it gives 200. Moreover Under API section Activate In part is blank.. Please suggest solution
The error
No 'Access-Control-Allow-Origin' header is present on the requested resource
indicates that DocuSign is not accessable through jQuery/AJAX. You're going to want to do your login request through another language and pass the variables through to JSHere is more details on the answer I provided above in PHP.
This was a quick example I just threw together to show the process that should be done, it will have to be modified to fit your needs (especially if you're not using PHP).
HTML page:
Script.php: