AHGGG / poe-node-api

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

fetch gql_POST error #20

Open spdevg opened 1 year ago

spdevg commented 1 year ago

When using the send message function, the first time https://poe.com/api/gql_POST is requested, an error occurs: ERROR: fetch failed: https://poe.com/api/gql_POST 403. Then the program automatically retries and the second request is normal. image

AHGGG commented 1 year ago

This might be a network error? How to reproduce this error.

spdevg commented 1 year ago

`import { PoeClient, sleep } from './dist/PoeClient.js'; let client = new PoeClient({ logLevel: 'debug' }); await client.init();

await sendMsg() async function sendMsg() { console.log(sleeping...) await sleep(2000) await client.sendMessage("ping", 'chinchilla', false, (result) => { console.log(${result}) }) console.log(msg sended!) }`

image

AHGGG commented 1 year ago

https://gist.github.com/AHGGG/71f8c371e4b898eaa1e8b815e51c2a91#file-poeclient-js https://gist.github.com/AHGGG/b6f427c9ddf1e7980e910126a8bf44dd#file-index-js

image

Can you tell me which method meets a 403 Forbidden error? Is it GetNextData, getChannelData, etc.?