AHGGG / poe-node-api

A reverse engineered Node.js client for Quora's Poe.
MIT License
38 stars 5 forks source link

Error: Invalid token or no bots are available. #12

Closed awwmey closed 1 year ago

awwmey commented 1 year ago

Error:

Error: Invalid token or no bots are available. Might: network error, try to getDataNext first. Or Viewer dataStructure changed, please create an issue on github

My code: api.js

import { PoeClient } from "poe-node-api";

const client = new PoeClient({ logLevel: "debug" });

await client.init();

await client.sendMessage(content, "a2", true, (result) => {
  console.log(`${result}`);
});

callApiFunction("Hello this is Amey");

I ran by using node api.js

my package.json dependencies

  "dependencies": {
    "pino-pretty": "^10.0.0",
    "poe-node-api": "^0.0.6"
  }
AHGGG commented 1 year ago

The viewer data structure has changed again. The viewerBotList is missing. I will fix it.

awwmey commented 1 year ago

thank you! if possible ping me here when you do so pls.

AHGGG commented 1 year ago

thank you! if possible ping me here when you do so pls.

Try 0.0.7 @ameywtf

awwmey commented 1 year ago

thank you! if possible ping me here when you do so pls.

Try 0.0.7 @ameywtf

I get this error

[20:24:46.372] DEBUG: wsUrl:wss://tch709684.tch.quora.com/up/chan58-8888/updates?min_seq=26120880889&channel=poe-chan58-8888-pjtzadkwaehglvgvbqra&hash=2706803670475832097
[20:24:47.176] ERROR: Connection error
[20:24:47.176] ERROR: Socket connection timeout
AHGGG commented 1 year ago

It might be a network issue. Please try again. If you still encounter this problem, please let me know how to reproduce this bug.

awwmey commented 1 year ago

Yes I think it was a network issue, It works now, thank you!