Answer the question
In order to leave comments, you need to log in
What is peer_id?
I can’t understand what kind of animal this peer_id is.
I made a test group, send a message from it to the bot and receive the following message object:
"date": 1562492622,
"from_id": -18191****, // собственно группа от имени которой отправил сообщение
"out": 1,
"peer_id": 1375****, // тот кому отправил
"text": "hi there",
"date": 1562492617,
"from_id": 1375****, // Тот кто отправил
"out": 0,
"peer_id": 1375****, // ШТА???
"text": "hi",
Answer the question
In order to leave comments, you need to log in
peer_id is the general id of some object, it can be a conversation, a user and a community.
For example
peer_id = 1234567 is the user id
peer_id = -1234567 is the community id (all community ids are negative only)
peer_id = 2001234567 is the chat id (all chat ids start from 2000000000)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question