title: getstream.io getting CORS request rejected: https://api.stream-io-api.com/api/v1.0/feed/user
body: <p>Trying to get realtime feed from getstream.io, but getting error saying <strong>"CORS request rejected: <a href="https://api.stream-io-api.com/api/v1.0/feed/user/" rel="nofollow noreferrer">https://api.stream-io-api.com/api/v1.0/feed/user/</a>..."</strong></p>
  
  <p>Following is my javascript code and Key,APP_ID and ReadOnlyToken is provided correctly.</p>
  
  <pre><code>        var stream = require('getstream');
          var client = stream.connect({{Key}}, null, {{APP_ID}});
          var user = client.feed('user', 511,{{ReadOnlyToken}});
          user.get({ limit:20, offset:0 })
          .then(function(response){
                  console.log(response);
           })
          .catch(function(error){
                  console.log(error);
           });
  </code></pre>
  
  <p>What do I need to do to make it work. I want to show users post in realtime at newsfeed. I'm using laravel as backened, and that was working fine and I'm able to get feeds from Feed Manager.</p>
  
  <pre><code>FeedManager::getUserFeed($user_id)-&gt;getActivities(0,25)['results'];
  </code></pre>
  
  <p>This is providing the user's feed but I need to implement realtime via javascript in VueJS. </p>
  
  <p><a href="https://i.stack.imgur.com/pLYSa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pLYSa.png" alt="enter image description here"></a></p>