Hello my people,
I signed up for a testing period in an API that sends messages via whatsapp.
Trying to understand how a webhook works, I created a message that asks for a 1-Right or 2-Wrong response.
There is a field in the API called webhook URL.
In it I need to put an https URL, this URL will receive the API response in JSON whenever the user answers 1-Right or 2-Wrong.
But:
A) When will the arduino receive this response?
After all, the arduino needs to receive some information that the answer is already available.
Or stay from time to time accessing the URL to see if there is an answer or not.
And if after X seconds without a response it (the arduino) aborts the operation being necessary to re-send the message with the same question or with any other information.
How does this happen in practice? Anybody know ?
I've done enough research.
B) What sites could I use as webhook's URL receivers that could receive JSON and be accessed by an arduino IDE code ? Do you have any examples ?
C) I did tests with IFTTT but using the GET request of the webhook URL as a trigger, and as an action, sending an email. It worked. But my question is how the arduino would be able to receive the 1-Right, 2-Wrong response, which is inside the JSON body of the webhook URL ?
D) I comment on IFTTT just as an example. The question is: how can the arduino read a JSON data in a webhook URL that is on any server ?
Thanks