title: Error when trying to use textapi.sentiment in javascript
body: <p>I keep receiving this error</p>
  <blockquote>
  <p>Error: Authentication failed   at IncomingMessage.</p>
  </blockquote>
  <p>And this is snippet of my code in the server.js file :</p>
  <pre><code>var aylien = require(&quot;aylien_textapi&quot;);
  var textapi = new aylien({
      application_id: process.env.API_ID,
      application_key: process.env.API_KEY
  });
  app.get('/test', (req, res) =&gt; {
      textapi.sentiment({
          text: 'John',
      }, function (error, response) {
          if (error === null) {
              res.status(200).send(response)
          } else {
              console.log(error)
          }
      });
  })
  </code></pre>
  <p>I have added the app id and key correctly but the response is always Authentication failed , didn't find an answer so far so had to create a question for it.</p>
  <p>and i use this code on client side to trigger the server response :</p>
  <pre><code>fetch('http://localhost:8081/test')
      .then((res) =&gt; {
          console.log(res)
          return res.json()
      })
      .then(function (data) {
          console.log(data)
          document.getElementById('results').innerHTML = data.message
      })
  </code></pre>
  <p>==Edit==
  I also tried running that api request on client side and got that error on chrome console :</p>
  <pre><code>Access to fetch at 'https://api.aylien.com/api/v1/sentiment' from origin 'http://localhost:8080' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
  api.aylien.com/api/v1/sentiment:1 Failed to load resource: net::ERR_FAILED
  localhost/:1 Uncaught (in promise) TypeError: Failed to fetch
  </code></pre>