REST API, regarding 403 error code?

血红的双手。 提交于 2019-11-30 09:02:23

问题


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


回答1:


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.




回答2:


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




回答3:


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




回答4:


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.



来源:https://stackoverflow.com/questions/21130292/rest-api-regarding-403-error-code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!