Resolve request body template: Processing the Request Body Template resulted in invalid JSON.
Unrecognized token 'Y2U5M2UzZDEtYTM1NS00YjA0LWFmYWUtYzkxOWU3MTA3NzcyOjlHYmRyeDVUMkRuTGRxQUFIUWdpNVpYUi1sWXhJNFRRZHFwazFTRG82YzA': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false') at [Source: REDACTED (StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION disabled); line: 3, column: 118]
I would like to know if there is a better way to pass credentials to the function?
When you configure your Request/Response Configurations, select the "JSON" switch (toggle from Simple to JSON display) first.
You can then copy the content that Jason gave you.
By copying while in Simple display, the UI will try to escape characters (that were already escaped).
I'm seeing what's being sent in the header regarding the credentials (even before reaching the function).
From what I've seen, only the clientSecret variable is working.
The loginUrl and clientId variables are returning "REDACTED"
What is defined as credentials attributes (in your Function Integration) will appear as in logging. So people can't read clientId and clientSecret or else when testing a data action.
As I explained, the REDACTED is to hide these values in LOGS/TRACES appearing in the Test Data Action when you test from the Genesys UI.
Your function is receiving the real values.
I am off for several days. So that's my last answer on this.