1
1
12332112022-01-04 15:48:21
JavaScript
1233211, 2022-01-04 15:48:21

What is callbackUrl?

There is an api that accepts some data and a callbackUrl, as I understand it, you need to transfer some kind of link there, but which one and what does it usually do with this link? It is clear that when you pass a function, it calls the function, but what happens to the reference? Api, in theory, cannot open a tab to the user or in the current tab of the user to transfer to this url?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
Pavel Shvedov, 2022-01-04
@1233211

There is an option that the apishka will redirect to this URL as a result

P
Pavel, 2022-01-04
@mrusklon

read the documentation for this specific api, don't you?

A
alekssamos, 2022-01-04
@alekssamos

For the program: when you don't call someone else's API, requesting data all the time,
but he himself calls your script.
This is the same as webhook.
For the user: when he left the site, the address where he can return after some action.
Examples:

http://rucaptcha.example.com/in.php?image=qwe.png&callback=https://mysite.example.com/success.php

The code will come in 20 seconds, rucaptcha.example.comthe service will send it to you on your site mysite.example.com.
And for the user, as mentioned above, you pass two links, one for success and one for error. If everything is ok, let's say the payment went through, one opens, but not passed or canceled - another.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question