401 - Unauthorized error in Postman
1 次查看(过去 30 天)
显示 更早的评论
Hi,
I tried to delete a channel data using POSTMAN as described here https://www.mathworks.com/help/thingspeak/clearchannel.html in Examples section: Use POSTMAN to Clear Channel
The channel ID is correct, the write API key is correct, and the answer of postman after sending request is:
{
"status": "401",
"error": {
"error_code": "error_auth_required",
"message": "Authorization Required",
"details": "Please provide proper authentication details."
}
}
I already tried to authorize me in Authorization tab using Basic Auth (username and password), but the result is the same.
I already tried to use api_key in the request command directly:
The result is the same. 🙁
Does this channel deletion method work at all on ThingSpeak?
0 个评论
采纳的回答
Vinod
2025-5-29
I suspect you are using your channel API key instead of the user API key.
Here's a curl request example:
curl --location --request DELETE 'https://api.thingspeak.com/channels/CHANNEL_ID/feeds.json' --form 'api_key="USER_API_KEY"'
The user API key is available from https://thingspeak.com/account/profile
更多回答(0 个)
社区
更多回答在 ThingSpeak Community
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 REST API 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!