I can 'get' data from a channel but cannot 'delete' the data

Mark Ennamorato on 7 Jul 2021
Latest activity Reply by Mark Ennamorato on 8 Jul 2021

Hi. simple question: im getting a 401 error when I try to delete data in a channel yet if i just change 'requests.get(...)' to 'requests.delete(...) i get a 401 error. what am i doing wrong? thanks

Christopher Stapels
Christopher Stapels on 8 Jul 2021

Check the documentation for the correct format. You cannot delete individual points, you can delete all data in a channel or delete the channel itself.

Create Channel Create new channel with HTTP POST

Clear Channel Clear all data from channel with HTTP DELETE

Delete Channel Delete channel with HTTP DELETE

Mark Ennamorato
Mark Ennamorato on 8 Jul 2021 (Edited on 8 Jul 2021)

Hi I followed exactly the Postman example and i always get: { "status": "401", "error": { "error_code": "error_auth_required", "message": "Authorization Required", "details": "Please provide proper authentication details." } }

If i change 'Delete' to 'Get' in POSTMAN is works perfectly... And i am wanting to delete all the data in the channel. I cannot delete the channel.

Christopher Stapels
Christopher Stapels on 8 Jul 2021

Please note that channel operations require the user API key, not the channel API key. Using the channel API key for a delete operation would lead to a 401. Please let me know if that helps, I'd like to make sure you succeed.

Mark Ennamorato
Mark Ennamorato on 8 Jul 2021

Yup... "read the fine print" as they say.. I did not notice that. Thanks