title: Linkedin Authorization header with GET
body: <p>I'm trying to integrate with linkedin but with <code>Authorization</code> param in the header, I followed the <a href="https://developer.linkedin.com/docs/oauth2" rel="nofollow noreferrer">docs</a> and i'm stuck in the last step which is <code>Step 4 — Make authenticated requests</code>, I'm using JS so i don't know how to add header to <code>IN.API.Raw("/people/~?format=json").result(onSuccess).error(onError);</code>, So i tried to do it manually with <code>XMLHttpRequest</code>.</p>
  
  <pre><code>n_url = "https://api.linkedin.com/v1/people/~?format=json";
  var gg = new XMLHttpRequest();
  gg.open("GET", n_url, true);
  gg.setRequestHeader("Access-Control-Allow-Origin", "*");
  gg.setRequestHeader("Authorization", "Bearer "+[ACCESS_TOKEN]);
  gg.send(null);
  </code></pre>
  
  <p>but this gives <code>OPTIONS https://api.linkedin.com/v1/people/~?format=json</code> error in the console in addition to <code>Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.</code>, So is there any way to use IN.API that allows me to add some headers (this will be simple), Or what should i do to fix my manual request, I'm noticing that the sent request is <code>OPTION</code> not <code>GET</code>, i searched a lot about that but i didn't get a clear answer.</p>
  
  <p>Any help?</p>