green-api / whatsapp-api-client-python

This library helps you easily create a Python application with WhatsApp API.
https://green-api.com/en
Other
144 stars 35 forks source link

Question | Find group's id by group name #47

Closed taaaal closed 8 months ago

taaaal commented 8 months ago

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

ArtyomKovl commented 8 months ago

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

You can get the group ID using the GetContacts method: https://greenapi.com/en/docs/api/service/GetContacts/ In the article you will find ways to determine the group ID: https://greenapi.com/en/docs/api/chat-id/#gus

taaaal commented 8 months ago

Oh, I see. I would recommend creating something like GreenAPI.serviceMethods.getGroups (split the whole contacts data between x.type == 'user' and x.type == 'group').

Anyways, thank you(:

ArtyomKovl commented 8 months ago

Oh, I see. I would recommend creating something like GreenAPI.serviceMethods.getGroups (split the whole contacts data between x.type == 'user' and x.type == 'group').

Anyways, thank you(:

Previously, a task was registered to improve the getContacts method to obtain a list of groups: Required to obtain a list of account groups. The task will be completed in future releases.