6

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..

astack
  • 3,837
  • 7
  • 22
  • 21
  • Twitter always gives you an error message along with a 403. What does the error message say? – kba Jan 15 '14 at 06:14
  • 403 Forbidden The request is understood, but it has been refused or access is not allowed. An accompanying error message will explain why. This code is used when requests are being denied due to update limits. – astack Jan 15 '14 at 06:15
  • @AmitBadgujar - This code is used when requests are being denied due to update limits. – Scary Wombat Jan 15 '14 at 06:16
  • @AmitBadgujar You're just posting the description from https://dev.twitter.com/docs/error-codes-responses. The actual 403 will have an error message attached. – kba Jan 15 '14 at 06:16
  • I have printed that same error code in my application, that's why i have posted same description. – astack Jan 15 '14 at 06:21

4 Answers4

9

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.

Ahmed Nabil
  • 17,392
  • 11
  • 61
  • 88
RomanK
  • 126
  • 5
3

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...

Sanjay Nagare
  • 442
  • 2
  • 10
2

if you are using twitter4j.properties, you can also set it there. http.useSSL=true

Akhila Lankala
  • 193
  • 1
  • 11
0

If this is the exception that is being thrown and if you read the error it says:

This code is used when requests are being denied due to update limits.

Scary Wombat
  • 44,617
  • 6
  • 35
  • 64