Bad Authentication data with



I try to get tweets for a user. I use codebird, a javascript library.
When i execute the request, i get this error :

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

Is-it possible to try a request directly in a browser ? I have tried to put my request in my browser and i get the same error. Here is my request :

Could you help me please ?

Thanks in advance :slight_smile:


We discourage using API v1.1 in client-side Javascript. OAuth 1.0A is not secure for use in that context.

It looks like this request is probably failing because you’re not URL encoding the “@” sign in your query string, causing the signature base string to also not be valid.


I currently have a Javascript client in the making that obscures the consumer secret by doing all the signing logic in a server-side PHP script, or in case of POSTs do the request via the server entirely.

This makes it more secure than for instance many Android apps, who have their consumer secrets as a plain static member or even as a string resource in xml.

Still I’m having difficulty getting the right combination of URL encoding going on.
URLs that work on the Android app don’t work in Javascript (I’m using jQuery).

Other endpoints do work for me, so it probably has to do with the encoding of the query.
Java and Javascript URL encoding differ a bit. Are you aware of anything with this that could cause this?

Thanks in advance.


Javascript’s default URL encoding methods aren’t always sufficient for OAuth 1.0A. This article has some hints on these: – if you have some particular strings you’d like to work through, I’m happy to.


how to get the oauth_timestamp dynamically in program in android


Hi, I’m having the same problem. Both on server side and from the browser. I’m encoding the parameters using twitter4J OAuthAuthorization.encodeParameters. When I copied the url and paste it to the browser it gave me the same error code.

My url was


ditto, wasted several hours at a hackathon, the error messages are also pretty useless.

errors: [
message: “Could not authenticate you”,
code: 32

pasted in the keys you gave me and still get this…


I am trying to understand what’s going on for last 12 hours but documentation definitely doesn’t help. Please, Do any one knows how to get search api working? I’ve spend a lot of hours to make an oAuth process work. So what and where should I do after to finally get results from search api? It is so frustrated=(


i am also facing same issue and when i get the twitter4J version 3.0.5 mine problem resolved


Spent already 2 days trying to work my way around with the new API. Total confusion! Usually new APIs either make stuff easier or clean up some messed up stuff. Feels the opposite is happening with the 1.1.
Anybody with cool tweak to this plz let me know!


I am working on the sample Twitter Api in this but it is showing error like this
{“errors”:[{“message”:“Bad Authentication data”,“code”:215}]} what can i need to do to make the sample code work perfectly.can u please let me know where i am doing mistake. waiting for reply.
Thanks in advance.


I meet this issue
{“errors”:[{“message”:“Bad Authentication data”,“code”:215}]}


Hello All,

We are getting the same issue here, it was worked will before few days, but now we are getting this issue.


I am getting the same issue here,


I am getting the same issue here, help meeeeeeeeeeeeeeeeee please


I am also getting the same issue, twitter must resolve it to use the twitter api…


Error: Bad Authentication data
What does it mean and how do I fix it?


what the hell twitter, did your developers abandon your API?


pls help me… i have a same issue


what language? how are you handling Oauth? can you provide a sample?