What’s wrong is that you are not passing everything that you are passing via curl.
In your POST request, you are only taking care of POST ‘https://sso.moodysanalytics.com/sso-api/v1/token’ --header ‘Content-Type: application/x-www-form-urlencoded’.
But you are not passing any data, which is the --data-urlencode ‘username=xxx’ --data-urlencode ‘password=xxxx’ --data-urlencode ‘grant_type=password’ --data-urlencode ‘scope=openid’ part
These need to go in the Request Body tab, as a Json string. The --data-urlencode option will basically do a urlencode on the data, so you would need to do this before hand, and then pass the urlencoded data in the json.
However, if you do not need to urlencode anything, as a test, you can just pass the data as is, like this:
Thank you very much for trying to help in my struggle with this node.
I tried your solution with different options but it does not seem to work.
Just for clarification: on my original attempt I was entering the username and password in the Authentication tab of the node. So I assume that this did not need to be typed again on the body. Would this be correct?
However, what I am uncertain about is how to consider the “grant_type” and “scope” pieces of data. Is that already assumed in the authentication tab or do they need to be entered into the “Request body” one? I tried also to enter those ones in the Request body and the user and pass on the Authentication tabe but it did not work. In the Authentication tab I used the option “basic”.