wangrongding / wechat-bot

🤖一个基于 WeChaty 结合 OpenAi ChatGPT / Kimi / 讯飞等Ai服务实现的微信机器人 ,可以用来帮助你自动回复微信消息,或者管理微信群/好友,检测僵尸粉等...
MIT License
4.96k stars 710 forks source link

ChatGPTError: ChatGPT failed to refresh auth token. Error: 403 Forbidden #33

Closed lisiyizu closed 1 year ago

lisiyizu commented 1 year ago

Automatic robot chat mode has been activated (node:41132) ExperimentalWarning: stream/web is an experimental feature. This feature could change at any time (Use node --trace-warnings ... to show where the warning was created) ChatGPTError: ChatGPT failed to refresh auth token. Error: 403 Forbidden at ChatGPTAPI.refreshAccessToken (file:///Users/xxxx/Documents/work/chatGPT/wechat-bot/node_modules/chatgpt/build/index.js:313:21) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async ChatGPTAPI.ensureAuth (file:///Users/xxxx/Documents/work/chatGPT/wechat-bot/node_modules/chatgpt/build/index.js:258:12) at async getChatGPTReply (file:///Users/xxxx/Documents/work/chatGPT/wechat-bot/src/chatgpt/index.js:14:3) at async defaultMessage (file:///Users/xxxx/Documents/work/chatGPT/wechat-bot/src/wechaty/sendMessage.js:38:27) at async WechatyImpl.onMessage (file:///Users/xxxx/Documents/work/chatGPT/wechat-bot/src/wechaty/index.js:47:3) { response: Response {

[Symbol(state)]: {
  aborted: false,
  rangeRequested: false,
  timingAllowPassed: true,
  requestIncludesCredentials: true,
  type: 'default',
  status: 403,
  timingInfo: [Object],
  cacheState: '',
  statusText: 'Forbidden',
  headersList: [HeadersList],
  urlList: [Array],
  body: [Object]
},
[Symbol(headers)]: HeadersList {
  [Symbol(headers map)]: [Map],
  [Symbol(headers map sorted)]: null
}

}, statusCode: 403, statusText: 'Forbidden', originalError: ChatGPTError: 403 Forbidden

f0ng commented 1 year ago

参考下 https://github.com/wangrongding/wechat-bot/issues/34

wangrongding commented 1 year ago

修复了同志们,具体看 readme

ImmortalBro commented 1 year ago

配置文件也增加,每次都是刷新使用新的TOKEN等内容,还是抛出403问题,作者有什么方案吗? image