[SOLVED] Can't get "Update Device Variable" PUT to work

Every time I attempt the PUT to update a device variable, I receive a 403 with the message “You do not have permission to perform this action.”

I use the same token in the header as was used to initially create the device so I’m not sure where the issue is occurring. For device_label and variable_label I am using the API Label as opposed to the name or GUID.

I have tried payloads ranging from just updating the name to copying and pasting the example from the API Docs.

Happy to provide more information/code as necessary to assist in figuring this out.

Thank you,

James

Greetings, find below an example to update a device variable property:

curl -X PUT -H "Content-Type: application/json" -H "X-Auth-Token: BBFF-XXX" \
-d '{"name": "demo"}' "https://industrial.api.ubidots.com/api/v1.6/variables/ID"

All the best

I’d rather get the Update Device Variable PUT to work as described here because it appears that it should work with API Labels rather than needing variable GUIDs.

hi there, it seems that there is an error with that specific endpoint, I will report it and once I get a solve alert I will come back with you.

Thanks for the report

Hi jotathebest,

Was this issue ever solved?
If so, is this still the recommended way of posting new data to a device on Ubidots via the API, or do you have a better method?

Hi there, that endpoint is actually working properly, I forgot to update the post, my fail.

About

to ingest data to Ubidots there is not another way rather than using our REST API, so please use it to populate your variables with values.

All the best