【问题标题】:RctEngine joinChannel with token generated from serve in ReactNative AgoraRtcEngine 使用从 React Native Agora 中的服务生成的令牌加入 Channel
【发布时间】:2020-12-26 15:55:10
【问题描述】:

我从服务器获取频道名称以及 tokenwithuid 和 tokenwithuserac。 如何使用这些让用户加入频道。

和之前的演示一样,我正在执行以下步骤

this._engine = await RtcEngine.create(appId)

添加了一些事件监听器

之后触发了下面的方法 等待 this._engine ?.joinChannel(this.state.token, this.state.channelName, null, 1)

但是使用来自服务器的令牌和频道名称,我收到错误代码 110。

【问题讨论】:

    标签: react-native agora.io


    【解决方案1】:

    ERR_NO_AUTHORIZED(110) 表示无效令牌。 可能的原因:

    1. 我看到你是用数字uid加入频道的,所以你需要传递tokenWithUid生成的token,而不是tokenWithAccount函数。
    2. 重新验证客户证书、应用 ID 和频道名称。
    3. 确保在 tokenWithUid 函数中动态设置到期时间。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-05-05
      • 2021-09-03
      • 2014-07-10
      • 2018-08-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多