title: How do I extract last tweets in my webpage in JSON format?
body: <p>I'm trying to get tweets using Twitter API like this:</p>
  
  <pre><code>https://api.twitter.com/1.1/statuses/user_timeline/user_timeline.json?screen_name=username&amp;count=2
  </code></pre>
  
  <p>But only when I go to that page, it returns the following:</p>
  
  <blockquote>
    <p>{"errors":[{"code":215,"message":"Bad Authentication data."}]}</p>
  </blockquote>
  
  <p>I haven't found something additional or special which I should have added to the request on their documentation here <a href="https://developer.twitter.com/en/docs/tweets/timelines/api-reference/get-statuses-user_timeline.html" rel="nofollow noreferrer">https://developer.twitter.com/en/docs/tweets/timelines/api-reference/get-statuses-user_timeline.html</a></p>
  
  <p>Is anyone investigated it earlier? I'd be very pleased if you shared how did you do that.</p>