401 - Unauthorized error in Postman

์กฐํšŒ ์ˆ˜: 4 (์ตœ๊ทผ 30์ผ)
Klaus
Klaus 2025๋…„ 5์›” 29์ผ
๋Œ“๊ธ€: Klaus 2025๋…„ 5์›” 29์ผ
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?

์ฑ„ํƒ๋œ ๋‹ต๋ณ€

Vinod
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
  ๋Œ“๊ธ€ ์ˆ˜: 1
Klaus
Klaus 2025๋…„ 5์›” 29์ผ
Thank you for your answer. It was the problem.
Now it is working well.

๋Œ“๊ธ€์„ ๋‹ฌ๋ ค๋ฉด ๋กœ๊ทธ์ธํ•˜์‹ญ์‹œ์˜ค.

์ถ”๊ฐ€ ๋‹ต๋ณ€ (0๊ฐœ)

์ปค๋ฎค๋‹ˆํ‹ฐ

๋” ๋งŽ์€ ๋‹ต๋ณ€ ๋ณด๊ธฐ:  ThingSpeak ์ปค๋ฎค๋‹ˆํ‹ฐ

์นดํ…Œ๊ณ ๋ฆฌ

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!

Translated by