Answer the question
In order to leave comments, you need to log in
How to avoid VK API limits?
Hello, I am writing a bot in PHP for the VKontakte community, I encountered such a problem.
The bot after 10-15 messages from different people goes to ignore for 10-15 minutes and so on every time.
Can anyone tell me if this is true in the VK API limits?
Answer the question
In order to leave comments, you need to log in
Why guess when you can open the documentation?
https://vk.com/dev/api_requests?f=3.1.%20Frequency...
To understand what's the matter, see the VK responses to each request - is there an error field there. Write them to the log so that you can figure it out after the fact.
To avoid exceeding the limits when there is an influx of visitors, do not process requests synchronously, but arrange a task queue. A request was received from a visitor - create a task and save it to the queue, and answer "ok" to the VK server and do nothing else now. Let another process, constantly running in the background, take one task from the queue, process it, and send a response to the user. Let it take into account the time of the three previous sent calls to the VK API. And if necessary, wait a little before performing the next one.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question