Hi there,
I am wondering. Suppose i sent a link to what'sapp in a handphone device. When i click the link i want it to update a record in a database. What is the best practice to do this? Is it using rest api or screen or else, and how to do it when using api?
regards
@IQ78 : I think the best approach would be using a REST API. I believe you will be generating unique URL and sending to each users ( eg : https://yourosserver/app/restmethod?uid=XYZ&token=TEST ).
When the user clicks the link, the API should accept the input, validate the parameters, and ensure the request is both legitimate and not duplicated. After performing the necessary operation, such as updating a database record, the API can then respond with an HTTP 302 redirect to a "Thank You" page ( by using methods from HTTPRequestHandler - SetStatusCode (302), AddHeader ).
Hello.
I wasn't considering the 302 option. I say API calls are good for machines to communicate. But humans like to see some visual elements.
If you will redirect to a page at the end, you can use a simpler approach. Send to a page the same parameters. That page will call the API from a Data Action (At Start) and provide the positive/negative feedback.
PS: Would need to test if the preview link feature of Whatsapp isn't making the call.