Accessing Search API in the browser - how to authenticate?


#1

I am trying to access the Search API for a student project. I have an API key, API secret, Access token, Access token secret. I am using the following url:

https://api.twitter.com/1.1/search/tweets.json??=%40twitterapi

The response is:

{“errors”:[{“code”:215,“message”:“Bad Authentication data.”}]}

I know I need to authenticate, but I’m not sure where to put the API key, etc. Do I include it as part of the url?


#2

No. You can’t do this via a browser, you need to use the API from code and use your API tokens in the OAuth headers. Take a look at twurl as a way to do this.