Can I send a login request from an ESP device?

I use Home Assistant and Node Red, and one of the components is a connection to Amazon Alexa (node-red-contrib-alexa-remote2). Works great. It gives my IOT a voice over the Alexa devices in the house. But, about two or three times a week, I am prompted - only in the debug window - to log on to, then enter my Amazon credentials. There's no data to retrieve, just log on and quit.

It only takes seconds, but I only know to do this if I happen to have the debug window open in Home Assistant, or an expected audio response doesn't happen. Like the verbal warning that my freezer temperature is above 0ÂșC.

So, my idea is, could I set up a Wemos or NodeMCU to do the logon and send my Amazon credentials automatically, then exit?

I think so, but the whole credential and https thing is quite tricky to manage to get working properly.

It's not HTTPS, it's a port on my Home Assistant server. I literally enter and enter my Amazon credentials.

What you need to know is if it is a post request, what is it that is being posted and to where.

It's probably a post (probably a php form). I will examine the HTTP code the next time it happens.