I
I
Ilkhomjon Matazimov2020-03-11 11:57:31
JavaScript
Ilkhomjon Matazimov, 2020-03-11 11:57:31

How to convert captcha from VKontakte?

I have a simple script for sending a message to a VKontakte group.
I wrote this script on my knee, purely in order to understand how to work with captcha.
I had no experience with captchas through api, so please do not throw stones.

I uploaded the script here: https://pastiebin.com/5e68a65b00dd3

The answer from the VKontakte server is as follows:

5e68a6d963fd5166607102.png

Documentation from VKontakte itself on working with captcha: https://vk.com/dev/captcha_error

The questions themselves:
1) Why, when sending captcha, with an already entered captcha key - an error occurs:5e68a773b804a717638560.png

2) How to arrange all this so that everything is asynchronous. So that when I clicked on the "start" button - first I requested data from the captcha, and then after entering the data in the captcha key field - the message itself was sent in the group?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
HemulGM, 2020-03-11
@mr_qpdb

https://vk.com/dev/captcha_error
Read more carefully

In this case, you should ask the user to enter the text from the captcha_img image and repeat the request , adding the following parameters to it:
captcha_sid - received identifier
captcha_key - text entered by the user

And you again ask for captcha, but with parameters.
Those. you need to repeat the request that was executed with an error, where they ask you to enter a captcha, and not this nonsense.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question