green-api / whatsapp-api-client-python Goto Github PK
View Code? Open in Web Editor NEWThis library helps you easily create a python application with WhatsApp API
Home Page: https://green-api.com/en
License: Other
This library helps you easily create a python application with WhatsApp API
Home Page: https://green-api.com/en
License: Other
Hey there, I was wondering if there is an option to create a WhatsApp bot like a Discord bot by any chance?
~ In simple terms, to control an account who isn't yours, but is defined as an official WhatsApp bot.
My goal in the purpose of the program is to send (not through my account. maybe, from a bot/webhook) all the messages I receive from group x to group y.
Anyways, thanks for any incoming reply(:
I did a pretty thorough search on the API docs, but maybe I missed something.
I wanted to know if there is a way to return all the groups I am in? (to work with a specific group that I want, but I don't have its ID)
Anyway, looking forward to any reply(:
Добавьте dev-ветку.
В master-ветке находится последняя стабильная версия. В dev-ветке можно принимать пулл-реквесты, вносить мелкие изменения и улучшения, работать, пока не будет готова новая стабильная версия.
I'm having problems on using this simple example:
https://github.com/green-api/whatsapp-api-client-python/blob/master/examples/sendTextMessage.py
This is what I've done:
greenAPI = API.GreenApi("IdInstance", "ApiTokenInstance")
response = greenAPI.sending.sendMessage("[email protected]", "my_message")
- 392xxxxxx26 (without prefix)
- 0039392xxxxxx26 (0039 prefix)
- +39392xxxxxx26 (+39 prefix)
This is the respective output.
"message": "Validation failed. Details: 'chatId' must be one of the next formats: '[email protected]' or '[email protected]'"
"message":
"Validation failed. Details: 'chatId' must be one of the next formats: '[email protected]' or '[email protected]'"`
it should send it to:
+39392xxxxxx26
let me know
?
Traceback (most recent call last):
File "/workspaces/whatsapp-api-client-python/main.py", line 15, in
main()
File "/workspaces/whatsapp-api-client-python/main.py", line 9, in main
response = greenAPI.sending.sendMessage("[email protected]", "Message text")
File "/workspaces/whatsapp-api-client-python/whatsapp_api_client_python/tools/sending.py", line 32, in sendMessage
return self.api.request(
File "/workspaces/whatsapp-api-client-python/whatsapp_api_client_python/API.py", line 93, in request
self.__handle_response(response)
File "/workspaces/whatsapp-api-client-python/whatsapp_api_client_python/API.py", line 117, in __handle_response
json.loads(response.text), ensure_ascii=False, indent=4
File "/home/codespace/.python/current/lib/python3.10/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/home/codespace/.python/current/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/home/codespace/.python/current/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Ошибка
Требуется передавать хосты по параметру для класса GreenApi, так как на данный момент они захардкодены внутри класса (см. скриншот)
Уровень
SDK
Error
It is required to pass hosts as parameters in the GreenApi class, currently hosts are hardcoded inside the class (see the screenshot)
Level
SDK
I have already read in a previous issue (Issue #43) that you cannot add members to groups if they are not in your contacts. Hence my question, is it possible through the API to add members to your contacts?
Looking forward to your reply, thanks
can't add members not registered on what's app phone to group ?
after run code below only numbers registered on phone added successfully
tdf = pd.read_excel('Book.xlsx') phones = tdf.Phones.tolist() for c in phones: c = '964'+str(c)+'@c.us' print('Start Processing : '+c) r = wclient.groups.addGroupParticipant(group_id,c) time.sleep(2) if r.data['addParticipant']: print('Phone added successfully ✅') s.append(c) else: print('Phone added Failed ❌') f.append(c)
I cant register account in your website. I am using selenium and trying to use a whatsapp api to remind my colleagues of all the pending assignments and due dates.
I want to run it in a runner in github so I cant use pywhatkit. Using selenium headless I cant save cookies for whatsapp as well.
https://github.com/sakmalh/APIITReminder
You can check my current progress here
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.