title: How to call Rest API with JQUery with additional Headers
body: <p>I want to give a call to citrix Rest API for webinar registration.</p>
  
  <p>Here is the URL for API:</p>
  
  <pre><code>https://api.citrixonline.com/G2W/rest/organizers/{organizerKey}/webinars/{webinarKey}/registrants
  </code></pre>
  
  <p>The request should be POST and it should have additional headers</p>
  
  <pre><code>"Accept", "application/json"
  "Content-type", "application/json"
  "Authorization", "OAuth oauth_token=ACCESSTOKEN"
  </code></pre>
  
  <p>I tried to make a AJAX call to this API but i am getting a Network 403 Error</p>
  
  <p>My code looks like this:</p>
  
  <pre><code>$.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);
      }
  });
  </code></pre>
  
  <p>Please help!!</p>