Why do I keep getting an authentication error for TalkBack with ESP8266?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have my ESP8266 connected to my Arduino Uno. (Through serial when not running code and through SoftwareSerial when running code) I have successfully updated a channel in ThingSpeak with both Arduino code and through the serial monitor. Now I want to use TalkBack. I started testing it using the serial monitor AT commands.
However, it keeps giving me the following error (in json, in my code below, I get the text response because I don't specify a format):
{"status":"401","error":{"error_code":"error_auth_required","message":"Authorization Required","details":"Please provide proper authentication details."}}
I am sending the following commands:
1-------> AT+CIPSTART="TCP","api.thingspeak.com",80
Response: CONNECT
OK
2-------> AT+CIPSEND=70
Response:
OK
3-------> GET /talkbacks/<my_talkback_id>/commands/execute?api_key=<my_talkback_api_key> \r\n
Response: Recv 70 bytes
SEND OK
+IPD,19:error_auth_requiredCLOSED
That's when I get the above error (that's what the error looks like in json format). And yes, I am using the API key from the TalkBack page. In fact, I usually copy the GET line from my TalkBack's webpage. I use a character count website to get the size (68) then add two (to make 70) because of the NL and CR the serial monitor adds. This is how I did it for ThingSpeak and it works fine.
Any help would be appreciated!
1 Kommentar
Christopher Stapels
am 17 Apr. 2020
I've had this error when I accidentally forget to update the command ID or accidentally grabbed the wrong talkback id. So you end up with the right API key for the wrong talkback.
Make sure the command is still active and hasn't already been executed.
Antworten (0)
Communitys
Weitere Antworten in ThingSpeak Community
Siehe auch
Kategorien
Mehr zu REST API finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!