asternic / wuzapi Goto Github PK
View Code? Open in Web Editor NEWSimple RESTful API for WhatsApp in Golang (using the Whatsmeow multi device library)
License: MIT License
Simple RESTful API for WhatsApp in Golang (using the Whatsmeow multi device library)
License: MIT License
can you add poll sending in api?
Hi, when webhook start i got receive en the webbhook server this message
invalid character 'j' looking for beginning of value
if i test the webhook server with postman everything works.
thanks
victor
.\main.go:99:4: s.routes undefined (type *server has no field or method routes)
.\main.go:101:4: s.connectOnStartup undefined (type *server has no field or method connectOnStartup)
curl -s -X GET -H 'Token: 1234ABCD' -H 'Content-Type: application/json' --data '{"Phone":"5491155554445","Preview":true]}' http://localhost:8080/user/avatar
404 page
2023-06-15T10:24:40+07:00 INF Already logged in, just connect host=0.0.0.0 role=wuzapi
10:24:40.510 [Client/Socket DEBUG] Dialing wss://web.whatsapp.com/ws/chat
10:24:48.665 [Client/Socket DEBUG] Frame websocket read pump starting 0xc000192420
10:24:54.332 [Client/Recv DEBUG]
10:24:54.332 [Client ERROR] Client outdated (405) connect failure
2023-06-15T10:24:54+07:00 WRN Unhandled event event=&{} host=0.0.0.0 role=wuzapi
10:24:54.429 [Client/Socket ERROR] Error reading from websocket: websocket: close 1006 (abnormal closure): unexpected EOF
10:24:54.430 [Client/Socket DEBUG] Frame websocket read pump exiting 0xc000192420
any update for this case?
The method for get user information is broken.
For example, the check method works correctly.
https://github.com/asternic/wuzapi/blob/main/API.md#gets-user-details
After connection to the API, when I send a message to a already existing user using its number, the message is send, but the message is not to the user, it creates a new chat using the passed number in the payload and send a message to a empty new chat.
Hello, could you please share an Example of payload for List and Buttons ?
could you added delivery report and chatstate better difference with webhook incoming message
I'm trying to send a message to a group, but it seems that the group uses some old jid format because with a freshly created group it's working.
Format of the jid is: 33******[email protected]
The error I get:
WRN: Bad jid format
Hi guys, im using wuzapi with node-red for a chatbot.
Last wednesday the chatbot works properly but today i have a new problem.
When I send an image to the bot in the payload I only receive the buffer of the photo but last week I received a payload that was an object with information about the person who sent the message and I received the image in .enc with the data to decrypt it (mimetype, FileENCSHA, FileENCSHA256, etc) and went through an api to pass it to base64
Did the API have any changes these days? I don't understand why now the image arrives different
Thank you
Hello, Sends a template message, that can contain quick reply buttons, url buttons and call buttons isnt working, gives me 404 error.
Saw that it was commented in last update, whatsmeow stopped working with templates?
Hello,
I'm trying to read voice messages, but the webhook doesn't work on them.
Is it by design, or did I make some installation or configuration errors?
2024-03-27T18:18:43Z INF Message Received | role=server host=0.0.0.0 id=E681F395EBE43BD9463D1BD84C8154E8 source=******@s.whatsapp.net parts=pushname: ******, timestamp: 2024-03-27 18:18:43 +0000 UTC, type: media
2024-03-27T18:19:50Z INF Chat Presence received | role=server host=0.0.0.0 state=composing media=audio chat=******@s.whatsapp.net sender=******@s.whatsapp.net
2024-03-27T18:19:50Z WRN Skipping webhook. Not subscribed for this type | role=server host=0.0.0.0 type=ChatPresence
2024-03-27T18:19:52Z INF Chat Presence received | role=server host=0.0.0.0 state=paused media= chat=******@s.whatsapp.net sender=******@s.whatsapp.net
2024-03-27T18:19:52Z WRN Skipping webhook. Not subscribed for this type | role=server host=0.0.0.0 type=ChatPresence
2024-03-27T18:19:53Z INF Message Received | role=server host=0.0.0.0 id=12D1A7116861B1EB87FB7EF1943E8B86 source=******@s.whatsapp.net parts=pushname: ******, timestamp: 2024-03-27 18:19:53 +0000 UTC, type: media
2024-03-27T18:19:59Z INF Chat Presence received | role=server host=0.0.0.0 state=composing media=audio chat=******@s.whatsapp.net sender=******@s.whatsapp.net
2024-03-27T18:19:59Z WRN Skipping webhook. Not subscribed for this type | role=server host=0.0.0.0 type=ChatPresence
2024-03-27T18:20:02Z INF Chat Presence received | role=server host=0.0.0.0 state=paused media= chat=******@s.whatsapp.net sender=******@s.whatsapp.net
2024-03-27T18:20:02Z WRN Skipping webhook. Not subscribed for this type | role=server host=0.0.0.0 type=ChatPresence
2024-03-27T18:20:02Z INF Message Received | role=server host=0.0.0.0 id=1ABDEE55801B3CBB35209528F5085616 source=******@s.whatsapp.net parts=pushname: ******, timestamp: 2024-03-27 18:20:02 +0000 UTC, type: media
When I send images or videos, the webhook is usually triggered normally, but I have a problem when I send a high-quality image (1.1 MB).
In the logs, I see that a POST request was sent
`{"level":"info","role":"server","host":"0.0.0.0","id":"FEE8EA4931F143A9C1","source":"[email protected] in [email protected]","parts":"pushname: xxxxxxxxx, timestamp: 2024-08-09 14:43:57 +0000 UTC, type: media","time":"2024-08-09T14:43:57Z","message":"Message Received"}
{"level":"info","role":"server","host":"0.0.0.0","path":"/app/files/user_1/FEE8EA4931F143A9C1.jpeg","time":"2024-08-09T14:43:57Z","message":"Image saved"}
{"level":"info","role":"server","host":"0.0.0.0","url":"https://mywebhook.com/wuzapi","time":"2024-08-09T14:43:57Z","message":"Calling webhook"}
{"level":"info","role":"server","host":"0.0.0.0","file":"/app/files/user_1/FEE8EA4931F143A9C1.jpeg","url":"https://mywebhook.com/wuzapi","time":"2024-08-09T14:43:57Z","message":"Sending POST"}`
But I have logs in my webhook that I never see, as if the webhook is not being triggered when I send large images.
i have 20-30 account connect and some of them keep getting disconect
I pay 60 dollars to switch from sqlite3 to phpmyadmin
Please add endpoint to get messages with pagination
Hola, en primer lugar quería agradecer por la creación de este proyecto, está muy interesante, me ha gustado mucho.
Además pasaba a reportar un error que me encontré el día de hoy (12/04/2024). No consigo crear la imágen docker ya que me da un error en durante el proceso:
=> ERROR [build 5/5] RUN go build -o server .
Adjunto una imágen en donde se muestra el error completo:
Muchas gracias nuevamente.
2022-11-14T19:06:26+07:00 INF Message sent host=0.0.0.0 id=B228D74613E2DDD0F7958F738A72AE86 role=wuzapi timestamp="{0 63804024386 19609344}"
2022-11-14T19:06:26+07:00 INF Message delivered host=0.0.0.0 id=D7E05D5EE17DD2A15ED3E96F3405E0D9 role=wuzapi source=[email protected] timestamp="{0 63804024386 19609344}"
2022-11-14T19:06:26+07:00 WRN Skipping webhook. Not subscribed for this type host=0.0.0.0 role=wuzapi type=ReadReceipt
2022-11-14T19:06:26+07:00 INF Got API Request duration=774.648288 host=0.0.0.0 ip=172.17.12.185:37724 method=POST req_id=cdp2ugkon3mb6v6tj9l0 role=wuzapi size=134 status=200 url=/chat/send/text userid=1
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x86bb3a]
goroutine 83199 [running]:
go.mau.fi/libsignal/state/record.(*State).SenderChainKey(...)
/home/cloud/go/pkg/mod/go.mau.fi/[email protected]/state/record/SessionState.go:297
go.mau.fi/libsignal/session.(*Cipher).Encrypt(0xc0014599a8, {0xc000884000, 0xb2, 0x160})
/home/cloud/go/pkg/mod/go.mau.fi/[email protected]/session/SessionCipher.go:71 +0x7a
go.mau.fi/whatsmeow.(*Client).encryptMessageForDevice(0xc00069d000, {0xc000ccf1e0, 0xaf, 0xaf}, {{0xc000831880, 0xd}, 0x0, 0x0, {0xc62306, 0xe}, ...}, ...)
/home/cloud/go/pkg/mod/go.mau.fi/[email protected]/send.go:362 +0x67d
go.mau.fi/whatsmeow.(*Client).handleRetryReceipt(0xc00069d000, 0xc000b43ea0, 0xc0011c78c0)
/home/cloud/go/pkg/mod/go.mau.fi/[email protected]/retry.go:152 +0x125d
go.mau.fi/whatsmeow.(*Client).handleReceipt.func1()
/home/cloud/go/pkg/mod/go.mau.fi/[email protected]/receipt.go:26 +0x33
created by go.mau.fi/whatsmeow.(*Client).handleReceipt
/home/cloud/go/pkg/mod/go.mau.fi/[email protected]/receipt.go:25 +0xca
hello asternic, thanks for sharing this project. i have some problem when i use this project on linux server, event historySync not trigger after scanned QR. but this event work normally on local machine (windows).
this some information maybe you need it.
Server
Local Machine
the indication this not trigger, folder files/user_xxx not created after scanned QR, but this running well on local.
thanks.
After build & run i got error :
panic: failed to upgrade database: Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub
goroutine 1 [running]:
main.main()
Can't sending old format group..
curl -s -H 'Token: xxxxxxx' -H 'Content-Type: application/json' --data '{"Phone":"[email protected]","Body":"hihi kirain"}' http://localhost:3000/chat/send/text
{"code":400,"error":"Could not parse Phone","success":false}
new group format is can send [email protected]"
hi everyone when send a image y say errot
TypeError: Failed to fetch
this error keep coming
[Client ERROR] Failed to get prekey for retry receipt: failed to query next prekey ID: database is locked (5) (SQLITE_BUSY)
what it means i am using sqlite
is there a way to get member infos (nickname,...) from a group?
I suppose get user api is capable to get friend info.
thanks in advance.
Hello,
Tried to setting up the webhook, but it simply doesnt work.
Some message I'v got so far:
"2022-11-24T03:07:49+07:00 WRN Skipping webhook. Not subscribed for this type host=0.0.0.0 role=wuzapi type=Message"
What happened? Does I missed something here? Tankyouu
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.