Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

REST API, regarding 403 error code?

We are posting Tweets to multiple accounts from same IP address using software application. And in response from twitter , we are getting 403 error code, API used by us is REST API.

Is there any limitations on IP address, because surely we are not crossing API post limit mentioned for REST API.

We are also not going above 140 characters.

Waiting for reply..

Thanks in advance..

like image 273
astack Avatar asked Jan 15 '14 06:01

astack


2 Answers

If it is a recent error (since Jan 14th) you can try to add this:

ConfigurationBuilder cb = new ConfigurationBuilder();
cb.setUseSSL(true); // <======== set use SSL

Twitter added a requirement on January 14th to use SSL/HTTPS when using their API.

The above code fixed it for me.

like image 102
RomanK Avatar answered Oct 02 '22 02:10

RomanK


api.twitter.com now requires SSL/TLS for all connections as of today(14th jan2014)

ConfigurationBuilder cb = new ConfigurationBuilder();

cb.setUseSSL(true);

Put these above lines of code where you are making a call to twitter.

It works...

like image 36
Sanjay Nagare Avatar answered Oct 02 '22 03:10

Sanjay Nagare