REST API, regarding 403 error code?

2019-01-26 14:06发布

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

4条回答
唯我独甜
2楼-- · 2019-01-26 14:13

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.

查看更多
做自己的国王
3楼-- · 2019-01-26 14:17

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

ConfigurationBuilder cb = new ConfigurationBuilder();

cb.setUseSSL(true);

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

The above code thats in bold, fixed it for me.

查看更多
男人必须洒脱
4楼-- · 2019-01-26 14:19

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

查看更多
Summer. ? 凉城
5楼-- · 2019-01-26 14:22

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

查看更多
登录 后发表回答