我正在使用此代码进行身份验证:
if (mPubnub == null) {
// publish key left blank as publish event is happening server side
mPubnub = new Pubnub("", SUBSCRIBERKEY);
mPubnub.setCacheBusting(false);
String authToken = ChatUtils.getMD5HashKey(jsondata.getString(SESSIONTOKEN));
mPubnub.setAuthKey(authToken);
mPubnub.setUUID(ChatConstant.CHANNELID);
mPubnub.isResumeOnReconnect();
mPubnub.subscribe(ChatConstant.CHANNELID, pubnubConnectionCallback);
}
并收到错误:
ERROR on channel 54013eec6eb2361f058b4567 : [Error: 112-0] : Authentication Failure. Incorrect Authentication Key : {"channels":["54013eec6eb2361f058b4567"]} : Forbiddencallback_messagemk----> Bundle[{message=SUBSCRIBE : ERROR on channel 54013eec6eb2361f058b4567 : [Error: 112-0] : Authentication Failure. Incorrect Authentication Key : {"channels":["54013eec6eb2361f058b4567"]} : Forbidden}]
答案 0 :(得分:0)
我尝试并设法解决这个问题。请在下面找到答案:
感谢 Surinder