GithubHelp home page GithubHelp logo

green-api / whatsapp-api-client-python Goto Github PK

View Code? Open in Web Editor NEW
120.0 4.0 32.0 445 KB

This library helps you easily create a python application with WhatsApp API

Home Page: https://green-api.com/en

License: Other

Python 100.00%
whatsapp-python whatsapp-chatbot-python whatsapp-api-python whatsapp-api whatsapp whatsapp-bot

whatsapp-api-client-python's Issues

Q | Create a WhatsApp bot

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(:

Question | Find group's id by group name

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-ветке можно принимать пулл-реквесты, вносить мелкие изменения и улучшения, работать, пока не будет готова новая стабильная версия.

issues on sending message through API

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:

  • created a developer account on green api
  • created an instance
  • activated the instance through quare code
  • installed libreries on my venv
  • changed the code of the ,py file as following:

greenAPI = API.GreenApi("IdInstance", "ApiTokenInstance")

  • changed the phone number as following:

response = greenAPI.sending.sendMessage("[email protected]", "my_message")

  • I tryed the following 3 phone number:
  1. 392xxxxxx26 (without prefix)
  2. 0039392xxxxxx26 (0039 prefix)
  3. +39392xxxxxx26 (+39 prefix)

This is the respective output.

  1. It send my message to +39 2xxxxxx26
  2. it returns me this error

"message": "Validation failed. Details: 'chatId' must be one of the next formats: '[email protected]' or '[email protected]'"

  1. it returns me this error

"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

Getting JSONDecodeError on invalid response from API

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 / Required to pass hosts as parameters in GreenApi class

Ошибка
Требуется передавать хосты по параметру для класса 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

ImportError

image

Код копировал из примеров.

add member to group issues

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)

Cant register account

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.