400 "{"errors":[{"message":"Bad Authentication data","code":215}]}


#62

getting the same thing please let me know also looking at this thread. if this really is an issue and not a fault at the users end who is trying to retrieve data using 1.1 api then twitter needs to handle this ASAP.


#63

The new REST v1.1 search API is not working, I am using PHP, just updated to 1.1 yesterday, everything else seems fine, except for search, the example from the dev website does not work:
$xml = $twitter->http(‘https://api.twitter.com/1.1/search/tweets.json?q=%40twitterapi’);

I am using PHP. Array ( [errors] => Array ( [0] => Array ( [message] => Bad Authentication data [code] => 215 ) ) )

Here is my work: http://pintweet.tk


#64

Make sure that the library you’re using is doing the right thing for you on the encoding of characters. It may over-encode if you pre-encode. API v1.1 is much stricter about only accepting valid encodings – in query strings, POST bodies, or the OAuth signature base string. Dig deeper into what your code is doing to understand how the request is actually being formulated.


#65

I don’t think it is a string encoding issue. I used to use the old search api, and it works fine:

$xml = $twitter->http(‘http://search.twitter.com/search.json?q=hello&rpp=5&page=2’, ‘GET’);

I think it is something wrong with the search API itself, or we will not get: Bad Authentication data [code] => 215


#66

The old Search API didn’t support require OAuth but API v1.1 does – are you not sending authentication credentials with your request?


#67

I’ve had the same problem just 15 minutes before.
I’ve looked for an answer that works properly but I haven’t found anything right.
Now I already fixed :slight_smile:
It’s not a string encoding issue. It just a string issue, more exactly the quotes. At least for me.
I’m using abraham’s “twitteroauth” and i’ve notice that i was passing the four parameters (costumer_key,costumer_secret,oauth_key & oauth_secret) between quotes. I use variables to defines it and it treats them like strings. That’s was the problem.
I pull quotes out and everything works fine.
I hope it will be useful for all you.


#68

Hi,

Did you get the final working search URL? We are facing tough time to break this issue. Appreciate your early response


#69

So instead of:

$consumer_key = "xxxxxxxxxxxx"
you used
$consumer_key = xxxxxxxxxxxx

?? I’m trying to solve the same problem,

thanks in advance!


#70

I am getting this errror on using twitter api 1.1
{“errors”:[{“message”:“Bad Authentication data”,“code”:215}]}
while trying to access https://api.twitter.com/1.1/users/show.json?screen_name=xxx

Kindly resolve this asap or if there is an alternate then please share.


#71

is this thing not working yet?


#72

also getting the same issue
is it get resolved?


#73

Im also getting same issue but now solved use of these url https://github.com/mcallisto/cakephp-twitteroauth/blob/master/Vendor/abraham-twitteroauth/DOCUMENTATION.
If any query plz send mail to soundarcse77@gmail.com


#74

same issue i couldnt fix it. What i need to do? i didnt parse base string and i dont want to do that.


#75

Thanks! That answer fixed the issue for me too


#76

Was this issue ever fixed?


#77

Same problem for me.

Here is my error code:

Fatal error: Uncaught exception ‘Exception’ with message ‘Error fetching remote http://api.twitter.com/1.1/users/lookup.json?user_id=72985339 [ status 403 ] {“errors”:[{“message”:“SSL is required”,“code”:92}]}’ in /home/binotumv/public_html/beta/sparks/oauth/0.3.1/libraries/OAuth.php:87 Stack trace: #0 /home/binotumv/public_html/beta/sparks/oauth/0.3.1/libraries/Request.php(504): OAuth::remote(‘http://api.twit…’, Array) #1 /home/binotumv/public_html/beta/sparks/oauth/0.3.1/libraries/Provider/Twitter.php(37): OAuth_Request->execute() #2 /home/binotumv/public_html/beta/application/controllers/auth.php(78): OAuth_Provider_Twitter->get_user_info(Object(OAuth_Consumer), Object(OAuth_Token_Access)) #3 [internal function]: Auth->oauth(‘twitter’) #4 /home/binotumv/public_html/beta/system/core/CodeIgniter.php(359): call_user_func_array(Array, Array) #5 /home/binotumv/public_html/beta/index.php(202): require_once(’/home/binotumv/…’) #6 {main} thrown in /home/binotumv/public_html/beta/sparks/oauth/0.3.1/libraries/OAuth.php on line 87

I don’t know how i can this problem.


#78

I’m having the same issue on a Android Studio app under development. Also, it occurs when:

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

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


#79

I am having the same problem. I created my Twitter App a few days ago. I am trying to call oauth/authenticate or account/settings from PHP using Abraham Williams’ Twitter OAuth library (downloaded from GitHub). From what I can tell, the tokens generated for my brand new app are invalid or expired.