Why I can’t send data to a device with Profile Token?
In fact, the endpoint “/device/:deviceID/data“ not working at all.
Is this a bug?
Hey @julihermes.melo! We already reached out through your support ticket, but wanted to share the answer here too in case anyone else runs into this.
In this case, you’ll need to use an Analysis Token.
Here’s a quick example:
curl --location 'https://api.us-e1.tago.io/device/{deviceID}/data' \
--header 'token: YOUR_ANALYSIS_TOKEN' \
--header 'Content-Type: application/json' \
--data '[
{
"variable": "example",
"value": "1"
}
]'
Just make sure your Analysis has access to the device through the Access Management module.
Let us know if you have any questions! ![]()