Using legato curl example not working

using the curl example here, I am getting an 500 Internal error.

server=“https://eu.airvantage.net
login=“”
password=“”
client_id=“”
client_secret=“”

curl -s “${server}/api/oauth/token?grant_type=password&username=${login}&password=${password}&client_id=${client_id}&client_secret=${client_secret}”

I have checked for all the other parameters and they look fine to me

Has anyone tried curl with their own credentials and is there anything else we need to get this working ?

For those encountering this, the examples on the webpage wont work as is. We have to ensure the url is encoded via --data-urlencode for each parameter and then it should work