title: Getting access token with axios
body: <p>I'm working with the <a href="https://developer.lyft.com/docs/authentication" rel="nofollow noreferrer">Lyft API</a>, and trying to figure out how to get an access token with axios with a node script.</p>
  
  <p>I can manually get an access token by using Postman by filling out the form like this:</p>
  
  <p><a href="https://i.stack.imgur.com/OCdBg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OCdBg.png" alt="Getting token inside of Postman"></a></p>
  
  <p>When I fill out the form, I can get a new token from Lyft successfully. </p>
  
  <p>I'm trying to translate this into a POST request using axios by doing this:</p>
  
  <pre><code>var axios = require('axios');
  var data = {
  "grant_type": "client_credentials",
  "scope": "public",
  "client_id": "XXXXXXXXX",
  "client_secret": "XXXXXXXX"
  };
  var url = "https://api.lyft.com/oauth/token";
    return axios.post(url, data)
      .then(function(response){
          console.log(response.data)
      })
      .catch(function (error) {
        console.log(error);
      });
  </code></pre>
  
  <p>When I run the script, I get this error:</p>
  
  <pre><code>{ error_description: 'Unauthorized', error: 'invalid_client' }
  </code></pre>
  
  <p>What am I missing from my axios request? Any help would be appreciated!</p>