title: npm package simple-oauth2 404 not found
body: <p>I have a weird bug going on with my code.</p>
  
  <p>I'm using the simple-oauth2 library (<a href="https://github.com/lelylan/simple-oauth2" rel="nofollow noreferrer">https://github.com/lelylan/simple-oauth2</a>) and my code works fine on Windows.</p>
  
  <p>When I try to run my code on a linux server (raspberry pi zero), the oauth library keeps on returning 404 Not Found for my oauth request (specifically "Access Token Error Not Found" as per the code below).</p>
  
  <p>What's going on?</p>
  
  <p>Code (working with Yelp API):</p>
  
  <pre><code>var fs = require('fs');
  
  var cID = fs.readFileSync('blahblahblah', 'utf8');
  var cSecret = fs.readFileSync('blahblahblah2', 'utf8');
  
  var credentials = {
      client: {
          id: cID,
          secret: cSecret
      },
      auth: {
          tokenHost: 'https://api.yelp.com',
          tokenPath: '/oauth2/token'
      }
  };
  
  var oauth2 = require('simple-oauth2').create(credentials);
  var tokenConfig = {};
  
  module.exports.gimmeMuhToken = function(cb) {
      oauth2.clientCredentials.getToken(tokenConfig, function(error, result) {
          if (error) {
              return console.log('Access Token Error', error.message);
          }
          cb(oauth2.accessToken.create(result).token.access_token); // Return the token
      });
  };
  </code></pre>
  
  <p>Thanks</p>