Following up, can you please bring an example of the format that the server would send to Ubidots?
In addition, please keep in mind that the UbiFunction module is available from the IoT Entrepreneur license and above. In case you own a STEM then I’d invite you to upgrade your account.
Hi Sergio, thanks for getting back to me. The server I am sending data from cannot send the parameters in the url, but can send it in JSON format in the body. I have attached an example JSON packet. Can this be received in Ubifunctions?
Yes, it can be received in the UbiFunctions module, however the POST method is currently only available for Professionals users and above. would you envision to deploy your solution to customers, or is it more a personal hobbyist project?
That is good news. We are planning on using this platform as a solution for our current and future customers. We would like to have our devices connected soon as we have some customers lined up and this would be a great platform for them. We are currently on the trial, do we need to upgrade to the professional plan to get this going?
If you are already in a trial then you don’t need to upgrade yet. UbiFunctions, while in a trial, allows you to choose the method freely: GET or POST.
To your case, it would be a POST.
If you’re sending custom headers different from the necessary to make the POST request, those should be also accesible from the “args” variable.
However, can you please advise which headers are you looking to access from the function?
I want to pass the Ubidots token as a header rather than as a html parameter. I have tried -H “X-Ubi-Token: 123” -H “X-Auth-Token:123”, but I cannot see any of the headers in the “args” variable.