I want to give a call to citrix Rest API for webinar registration.
Here is the URL for API:
https://api.citrixonline.com/G2W/rest/organizers/{organizerKey}/webinars/{webinarKey}/registrants
The request should be POST and it should have additional headers
"Accept", "application/json"
"Content-type", "application/json"
"Authorization", "OAuth oauth_token=ACCESSTOKEN"
I tried to make a AJAX call to this API but i am getting a Network 403 Error
My code looks like this:
$.ajax({
url : url,
dataType : "jsonp",
headers: { "Content-Type":"application/json","Accept": "application/json","Authorization": "OAuth oauth_token=ACCESSTOKEN" },
type : 'POST',
contentType: "application/json",
data : {"firstName" : "FirstName", "lastName" : "lastNAme",
"email" : "abc@xyz.com"},
success : function (data) {
console.log(data);
},
error : function (data, errorThrown) {
alert(3);
}
});
Please help!!