Twitter search API authentication error
<p>I need to build a simple web application that gets live data from an API, such as twitter search. I am reading about how to go about this in Javascript (I am not allowed to use jQuery for this assignment). Let's say I want to gather tweets about Bernie Sanders. I just want to see the JSON data in my browser window, but when I paste in the link hit enter, I get the error:</p>

<pre><code> {"errors":[{"code":215,"message":"Bad Authentication data."}]}
</code></pre>

<p>The link I used was <a href="https://api.twitter.com/1.1/search/tweets.json?q=Bernie%20Sanders&amp;src=typd" rel="nofollow">https://api.twitter.com/1.1/search/tweets.json?q=Bernie%20Sanders&amp;src=typd</a>. From what I have read, it has to do with 1.1 and Oauth, so I registered an application on twitter and jotted down the consumer and access keys, but I am not sure what to do with them. I really do not know where to begin. If someone could point me in the right direction, I would greatly appreciate it. </p>