Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: websocket链接,认证不通过,但是使用api方式验证token是有效的 #108

Open
luoqiang-wm opened this issue Feb 21, 2025 · 1 comment

Comments

@luoqiang-wm
Copy link

Image

Image

Image

版本信息:
"@coze/api": "^1.0.20",
代码使用:

private get client() {
    return new CozeAPI({
      token: this.getCozeToken,
      baseWsURL: COZE_CN_BASE_WS_URL,
      debug: true,
    });
  }

this.client.websockets.chat
        .create(option.botId, {
          maxRetries: 10,
        })
@jackshen3102
Copy link
Contributor

Image

Image

Image

版本信息: "@coze/api": "^1.0.20", 代码使用:

private get client() {
    return new CozeAPI({
      token: this.getCozeToken,
      baseWsURL: COZE_CN_BASE_WS_URL,
      debug: true,
    });
  }

this.client.websockets.chat
        .create(option.botId, {
          maxRetries: 10,
        })

应该是base url 设置有问题,国内是cn 结尾,海外是com结尾

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants