A
A
Artem2020-11-27 11:16:09
PHP
Artem, 2020-11-27 11:16:09

How to get the user's access token without redirecting to the site?

We have a server that processes all requests from the VK API, in PHP, and a community bot that communicates with the user.
For my task, I need to get the user's access token using the Authorization Code Flow system ( https://vk.com/dev/authcode_flow_user ).
In paragraph 3, on the VK API website, it is written that after successful authorization of the user and granting them rights, he will be redirected to the site specified in the redirect_uri.
Why this is done, I don’t understand, I don’t need people to be thrown to my site, so that later they can return to the dialogue.
Is there any way to bypass this system, or maybe I don't understand something?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nokimaro, 2020-11-27
@nokimaro

Substitute your site in the redirect_uri, for this it is needed for the user to return to you.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question