to be able to download a snapshot of a dashboard at any time. Since there is no option to do this from the Losant API node in a workflow, I have tried to do this using the HTTP node by making an HTTP POST request. The problem is that, using both Losant and Postman workflows, I always get the same error:
Hello again. I just realized that I had not set the Content-Type to application/json. However, now Losant’s response is a 403 Forbidden error, and I don’t know what could be going wrong:
As far as your first issue, you are correct; you needed to set the “Content-Type” header to “application/json”.
As for the second issue, the “Dashboard: Send Report” endpoint is not scoped to an application (because that endpoint works both for dashboards scoped to an application and dashboards that span multiple applications), which is why you are getting a permissions error when trying to use that token.
Instead, you can use a user token to authenticate the request. Those tokens provide access to any resource you have as a user - essentially the same permissions you have when viewing the web interface. For that reason, I strongly recommend you take advantage of the token permissions feature and only provide permissions for the “Dashboard: Send Report” endpoint.
Also, FYI, I did file a feature request to create an “Application Dashboard: Send Report” API endpoint so that you can make that call using a Losant API Node as you originally tried - that is, assuming the dashboard in question is scoped to a single application and is not a cross-application dashboard.