Tasker HTTP Post - 401 Unauthorized


#1

Hello,

I’m trying to communicate with my NodeMCU from tasker, but I get 401 error (in the log file of the task). I want to send some data to switch a relay, basically {true/fasle} statements. I attached also 2 screenshots with my current setup. For Content-Type, there’s no application/json option - which i found to be a problem for other persons.

Any advice ? Thank you !


#2

Hi @phc, the application/json content type is required for a proper call to the device. Sure the tasker does not support that?

In the other way, how do you obtained the token used in the Path? I suppose you issued an Access Token for this device, is it?


#3

@alvarolb thank you for your response. I think that *application/ ** is covering the json type, so I think that the problem is not there.

To be able to communicate with the device I created a device token (which is a very long string of chars) from device dashboard.

What other apps can I use to make a HTTP post ? maybe Tasker is the problem, maybe not.

Thanks again !


#4

Also checked with IFTTT, the error is 404. I’ve followed the tutorial on the community forum. Any ideas ?


#5

Finally, I solved the problem. It seems that it was a problem with the generated token. Also, for tasker users, you can manually write in the content type, application/json and it’s working.


#6

Nice! Glad it worked!