REST API,关于403错误代码? [英] REST API, regarding 403 error code?

查看:61
本文介绍了REST API,关于403错误代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用软件应用程序将推文从同一IP地址发布到多个帐户.作为回应,twitter收到了403错误代码,我们使用的API是REST API.

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.

IP地址是否有任何限制,因为我们肯定没有超过针对REST API提到的API发布限制.

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

我们也不会超过140个字符.

We are also not going above 140 characters.

等待回复.

先谢谢了.

推荐答案

如果是最近的错误(自1月14日起),您可以尝试添加此内容:

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 于1月14日添加了一项使用API​​时使用 SSL/HTTPS 的要求.

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

上面的代码为我修复了它.

The above code fixed it for me.

这篇关于REST API,关于403错误代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆