Gardena oauth2 and redirect

Hi Im trying to get oauth2 to communicate with the gardena api, using this flow: chmuck’s gists · GitHub

I keep getting error 400.
I ran gardena's test terminal on my nodered pi and it could get a token, so there is working autorized communication to gardena api.

curl -X POST -d "grant_type=client_credentials&client_id=xxxxxxxxxxxxxx&client_secret=xxxxxxxxxxxxx"
https://api.authentication.husqvarnagroup.dev/v1/oauth2/token

so it must be something with oauth2 node not working.

But Im not very familiar with oauth2 and dont know about the redirect url I have to setup in the gardena api.
Does the redirect url point to my public ip, and I then have to open a port for it to point internal to nodered? or is it something in the nodered I have to setup?

Anyone who can point me in the right direction?

basically I just want it to park my "smart" mower when it starts to rain :wink: