Authenticaton Bearer Token local web api

I’ve been following this tutorial.
The one thing I couldn’t automate (using Node Red currently, flow available, just PM me) is step 2.
He already discussed this in this post on step 2b.

However I was succesfull in receiving my personal refresh token by manually going through step 1-3.
Been using the refresh token for a week in my Node Red flow succesfully.