title: How is obtaining the Access Token in LinkedIn OAuth 2.0 authentication supposed to be made as a POST request?
body: <p>Sorry if this is a simple question.</p>
  
  <p>I'm a LinkedIn newbie and am attempting to complete the OAuth 2.0 process to obtain the 60-day "access token" after obtaining the temporary "authorization code" as described at <a href="https://developer.linkedin.com/documents/authentication" rel="nofollow">https://developer.linkedin.com/documents/authentication</a>.</p>
  
  <p>I had no problems with part 3a - obtaining the temporary authorization code. I simply redirected the user to the LinkedIn URL:</p>
  
  <pre><code>https://www.linkedin.com/uas/oauth2/authorization?response_type=code
                                         &amp;client_id=YOUR_API_KEY
                                         &amp;scope=SCOPE
                                         &amp;state=STATE
                                         &amp;redirect_uri=YOUR_REDIRECT_URI
  </code></pre>
  
  <p>and after the user granted permission they are redirected back to my app, and the returned parameters are checked to see if everything went well and the temporary authentication code is retrieved as one of the form parameters returned, as per the docs.</p>
  
  <p>However, I am confused as to how to proceed with step 3b - exchanging the authorization code for an access token (which can then be used to make API requests). My confusion is because even the docs show show what appears to be a typical GET URL with parameters, it says "POST" next to it. So I believe a POST request must be made instead of a GET.</p>
  
  <p>But what do they mean by this? Why do the docs give a URL with query parameters rather than detailing the needed POST request, with a URL and how the parameters should be formatted in the body? I'm basically just not sure how I should form my request for step 3b.</p>
  
  <p>I'm assuming I can't simply redirect my users to the 3b URL as I did with the 3a URL, right? That would be easy if I could. </p>
  
  <p>The language I'm using is server-side JavaScript. I can redirect. I can form and make POST requests if I know the needed format. I can create GET requests. I'm just not familiar with this situation, where the docs which say the request should look like this:</p>
  
  <pre><code>https://www.linkedin.com/uas/oauth2/accessToken?grant_type=authorization_code
                                         &amp;code=AUTHORIZATION_CODE
                                         &amp;redirect_uri=YOUR_REDIRECT_URI
                                         &amp;client_id=YOUR_API_KEY
                                         &amp;client_secret=YOUR_SECRET_KEY
  </code></pre>
  
  <p>yet at the same time indicate that it is a POST request.</p>
  
  <p>Is there some short-cut method of using that URL as is to make a POST request? Or am I supposed to understand how to take that URL and turn it into a typical post request and put all the parameters into the body and just make my request to <a href="https://www.linkedin.com/uas/oauth2/accessToken" rel="nofollow">https://www.linkedin.com/uas/oauth2/accessToken</a> itself?</p>
  
  <p>Sorry if it's something that should be obvious. It's just not something I have encountered before.</p>
  
  <p>Any help here would be appreciated.</p>
  
  <p>Thanks,</p>
  
  <p>doug</p>