java 添加好友 注册用户 报appkey在黑名单,或参数错误

sdk
标签: #<Tag:0x00007f2146a55a78>

(嘻嘻哈哈的忧郁) #1

Request is forbidden! Maybe your appkey is listed in blacklist or your params is invalid.之前注册用户,和添加好友都成功了,但是再次访问就报这个问题,调用查询还是可以进行查询


#2

提供你所调的 API ,所传的参数,完整的日志信息(除了报错,包含你请求的信息)

用 curl 或 Postman 使用同样的参数去请求的结果是什么


(嘻嘻哈哈的忧郁) #3

userName:BT22505
2019-04-17 10:15:35.190 INFO 4040 — [nio-9106-exec-2] fangrong.com.cn.server.impl.UserServiceImpl : 需要添加的好友参数:[BT10543, BT10731, BT18475, BT20694, BT20424, BT22119, BT18479, BT22216, BT22117, BT22516, BT22038, BT10563, BT11233, BT21711, BT22217, BT18956, BT20629, BT19676, BT18253, BT22145, BT19492, BT21473, BT20634, BT21601, BT22521, BT22236, BT22089, BT20986, BT19029, BT21513, BT11009, BT20426, BT20824, BT19699, BT20450, BT22503, BT21093, BT10566, BT22519, BT11187, BT10811, BT21880, BT19282, BT21740, BT20654, BT21736, BT20939, BT22355, BT20635, BT21372, BT21068, BT10564, BT19131, BT20419, BT22523, BT22524, BT22525, BT21737, BT21969, BT20800, BT22279, BT1923, BT21707, BT22505, BT21480, BT20493, BT20427, BT21113, BT21470, BT19682, BT20633, BT22513, BT22511, BT21493, BT19335, BT22509, BT22520, BT20827, BT21581, BT22517, BT18478, BT10853, BT22215, BT20637, BT22372, BT18683, BT22518, BT20940, BT20847, BT19281, BT20420, BT21889, BT22214, BT19681, BT22506, BT20830, BT21494, BT22200]
2019-04-17 10:15:35.390 WARN 4040 — [nio-9106-exec-2] cn.jiguang.common.connection.NativeHttpClient : Got error response - responseCode:403, responseContent:{“error”:{“code”:899070,“message”:"[“BT22506”] are already added"}}
2019-04-17 10:15:35.390 ERROR 4040 — [nio-9106-exec-2] cn.jiguang.common.connection.NativeHttpClient : Request is forbidden! Maybe your appkey is listed in blacklist or your params is invalid.
{}
at cn.jiguang.common.connection.NativeHttpClient._doRequest(NativeHttpClient.java:235)
at cn.jiguang.common.connection.NativeHttpClient.doRequest(NativeHttpClient.java:99)
at cn.jiguang.common.connection.NativeHttpClient.sendPost(NativeHttpClient.java:86)
at cn.jmessage.api.user.UserClient.addFriends(UserClient.java:293)
at cn.jmessage.api.JMessageClient.addFriends(JMessageClient.java:292)

调用的是sdk的JMessageClient.addFriends方法


(嘻嘻哈哈的忧郁) #4

说是用户已添加好友但是我这个用户从来没有添加其他任何好友,其他用户添加过这个用户的好友,这个用户就不能批量添加了吗?


#5

好友关系是相互的,不是单向的