API callback
An asynchronous API request known as a callback comes from the API server and is delivered to the client in response to one that the client has already made. Callbacks are a useful tool for APIs to provide information about interesting events and to identify them.
The following figure shows an illustration of the API callback.
Figure 6.2 - API callback
As shown in Figure 6.2, let’s imagine that we are developing an API or application that requires a third-party service to perform some heavy processing, and that it is a time-consuming process. In such a case, we would submit the request to the server and not wait for the server to respond immediately. Once the server completes the processing, it will send back the results to the client over the callback URL provided by the client.
The API callback URL can be secured by using a JWT token or by implementing any authentication mechanism on the API callback URL.
There are the mechanisms...