REST API V1.1 search functionality giving (215 Bad Authentication) data error


#1

Am using twitter REST API V1.1 like this
HTTParty.get(“https://api.twitter.com/1.1/users/search.json?q=Twitter",{:headers=>{“content-type”=>“application/json”,“accept”=>"application json”},:body=>{}})
but it giving error (215, Bad Authentication data)
Can any one give the solution for this?

but am using user/show API like same as above i used,It working fine.
@search_twit=HTTParty.get(“https://api.twitter.com/1/users/show.json?screen_name=TwitterAPI&include_entities=true",{:headers=>{“content-type”=>“application/json”,“accept”=>"application/json”},:body=>{}})


#2

API v1.1 endpoints require OAuth authentication – are you leveraging OAuth in your request to the 1.1/users/search API?


#3

I don’t know how to authenticate using OAuth using rails, can you give me some guidance. do you have any sample ruby code for this.
i tried this url for oauth authentication & i registered one application in twitter, using that consumer_key and app_id i tried this.
https://dev.twitter.com/docs/auth/oauth/single-user-with-examples
but i cant get the solution.


#4

Depending on how you like to code, there’s an OAuth gem for Ruby that’s pretty decent. It’s the simplest way to interact with the API and process responses yourself. If you prefer a more object-oriented approach, check out the “twitter” gem on github.


https://github.com/oauth/oauth-ruby


#5

We have a native iPhone app in which we are using v1 of Twitter Search API. We would like to migrate to using V1.1 Search API but not entirely sure how to authenticate using OAuth. The Nonce and Timestamp parameters are confusing.

We only require READ-ONLY access to tweets. Any guidance or sample code would be helpful.


#6

Yeah, I’m having the same issue with 1.1, but it’s weird. It works with say “lebron”, but if I search for “#lebron”, then I get the above error. I am mapping the # to %23.


#7

I’m trying to migrate my android app from v1 to v1.1. Not sure how I can use oauth for twitter search queries. If there’s an existing reference, please point me towards it.

Thanks


#8

while using the REST API v 1.1 for the user details

GET account/verify_credentials

https://api.twitter.com/1.1/account/verify_credentials.json

getting the bad authentication data 215 .

so before getting details i already had the access token and token secret and request with the simple process of url request in android.As new to android and most with the twitter api not getting what to do?


#9

With Twitter API ME how to get the profile image or avatar image.