secret key:86726e4356dce2d3
系统毫秒数:1490325990593
GoEasy-otp:+rOKqbTZioistsdMrhon0A==
var goEasy = GoEasy.getInstance({
host:"hangzhou.goeasy.io", //若是新加坡区域:singapore.goeasy.io
appkey:"您的client key",
modules:['pubsub']//根据需要,传入‘pubsub’或'im’,或数组方式同时传入
});
goEasy.connect({
otp:'您服务器端生成的OTP',
onSuccess: function () { //连接成功
console.log("GoEasy connect successfully.") //连接成功
},
onFailed: function (error) { //连接失败
console.log("Failed to connect GoEasy, code:"+error.code+ ",error:"+error.content);
},
onProgress:function(attempts) { //连接或自动重连中
console.log("GoEasy is connecting", attempts);
}
});