whatsapp-http-api
whatsapp-http-api copied to clipboard
[BUG][WEBJS] - get /api/session/chats takes too long
Hello
Getting contacts chat intially ( not messages but just chats call ) take soo soo long in the first time . When i call Chats after scanning QR
It takes between 2 min to even 8 min for some users. Is that normal, and is there away i can spend things ? , or someway to only load like the last 100 recent , and then request the rest. I would love any idea that can help . This is only for initial load , as after that it's acceptable as all chats returned less than minute , for that first one it takes too much . I event had to increase HttpClient.Timout , because it times out before returns response
I would apperciate any advice
Version { "version": "2024.5.6", "engine": "WEBJS", "tier": "PLUS", "browser": "/usr/bin/google-chrome-stable" }
with some accounts it was 1000 chat
Added limit
and offset
parameters to GET /api/{session}/chats
endpoint.
- Read more about Get all chats
- Build:
2024.6.4
- Engine: WEBJS
- Engine: NOWEB
Get all chats
Get all chats
GET /api/{session}/chats
-
limit
- limit the number of chats to return -
offset
- skip the number of chats from the start
If you see timeout or the request takes too long - consider using limit
parameter to get chats in smaller chunks
GET /api/{session}/chats?limit=100&offset=0