Sarah cartenz
Sarah cartenz

Reputation: 1313

Bad Authentication data on twitter api with http status 200

I am using a twitter library in javascript called codebird-js. I provided my consumer key and token to tweet however I get back code 215 with the http status 200. On the twitter website it says that you usually get this code with http 400 so I dont know the meaning of this. This is the sample code, can anyone give me pointers on why I am getting this error:

        <script type="text/javascript">
        var cb = new Codebird;
            cb.setConsumerKey('xxx','xxx');
            cb.setToken('xxx', 'xxx');

            var params = {
                status: "im trying"
            };
            cb.__call(
                    "statuses_update",
                    params,
                    function (reply) {
                        console.log(reply);  
                    });
    </script>

Upvotes: 1

Views: 334

Answers (1)

Andrei Dragotoniu
Andrei Dragotoniu

Reputation: 6335

215 means

Bad authentication data - Typically sent with 1.1 responses with HTTP code 400. The method requires authentication but it was not presented or was wholly invalid.

source : https://dev.twitter.com/overview/api/response-codes

Upvotes: 1

Related Questions