Hello community.
I need help with the following:
I'm creating an API that queries specific analytics.
Using the IBM documentation I managed to extract the API KEY credentials, obtaining the following.
This is a postman project that directly queries the back and extracts the token for the analytic query, but the body must be in 'x-www-form-urlencoded' format with 'grant_type' and 'apikey' variables.

Now I am building the following flow in api connect 10

Inside the gatewayScript I have the following:
and in the invoke node I have the variable that contains the back endpoint, JSON type back and HTTP method POST.
When creating my postman project with the api endpoint and sending the same variables in the 'x-www-form-urlencoded' method as indicated in the documentation, I am getting the following error:

Can you help me resolve this error and be able to generate the token as shown by the postman project directly to the backend?
thank you very much for your help
------------------------------
JIMMY VIVAS PERILLA
------------------------------