How the callback_url parameter works

Table of Content
Intro

The callback_url parameter is designed to send data to the user's URL. The parameter is specified directly in the POST request while creating a data update task. After completing the POST request, the data will be updated and sent to the specified URL. On its side, the user can immediately use the data for its own purposes.

Thus, the callback_url parameter allows you to simplify integration and reduce the requests number as well as speed up and automate data retrieval.

How it works

In the callback_url parameter you need to specify a link to which the query results will be sent. In the example below, we stated a link to webhook.site.

We go to webhook.site and get a unique link that will accept requests from us.

  1. The link to the page where all our requests will be displayed: https://webhook.site/#!/a66b7678-5dc3-4f05-a4ac-a197cc602228/1a9dcb8d-808c-432d-a01d-adccb0fcfe59/1
  2. The link to send the results to: https://webhook.site/a66b7678-5dc3-4f05-a4ac-a197cc602228

As an example, let's make a request to search the last 25 posts on Facebook using the keyword "toyota". We also specify the link №2 on webhook.site in the callback_url parameter.

We send a POST request:

COPY

https://api.data365.co/v1.1/facebook/search/toyota/posts/latest/update?max_posts=25&callback_url=https://webhook.site/a66b7678-5dc3-4f05-a4ac-a197cc602228&access_token=YOUR_TOKEN

In the postman, it looks like this:

A couple of minutes to wait and then we get the response which comes to the link from webhook.site. The response contains a list of the last 25 posts, for the keyword "toyota".

As you can see, it took about 6 minutes to complete the request.

Similarly, callback_url can be used in all POST requests. The webhook link was used just as an example. The main priority is to make the setting on your side so that your application can receive JSON responses from our API.