Auth Home Assistant API cURL

I am making an application in Nodejs and Express with Home Assistant. The idea is to be authenticated by URL without being redirected to the login page. My question is if I can pass the login credentials through the [body], avoiding the redirection to the Home assistant login page.