Hi All,
I have used the Web Services data actions integration to create a series of data actions for a CRM. This is working, however the 'Data Action (Auth)' action is currently encoding credentials within the URL.
This CRM supports receiving these credentials encoded within the URL, or as Form Data - but not as json in the request. I am trying to refactor this to avoid sending credentials in the request URL.
I am able to successfully call this API from Postman while providing credentials as Form Data, however I am unable to replicate this success using Data Actions within Genesys Cloud.
I've seen another post where a Genesys employee shared an example from their notes, however this failed validation when I tried it, and I haven't been able to find a way to make this work.
Other Post: How to add Form Data in PureCloud Action Request
Has anyone managed to get this working?
I've got the following config (I've left some out and redacted my creds, but I'm sharing what I think is relevant. Feel free to ask for more if you need to see anything else):
Content-Type: multipart/form-data
Request Body (from Postman Console):
Request Body
grant_type: "refresh_token"
client_id: "myclientid"
client_secret: "myclientsecret"
refresh_token: "myrefreshtoken"
Request Body Template (From Genesys Cloud):
"requestTemplate": "grant_type=$esc.url("refresh_token")&refresh_token=$esc.url("myrefreshtoken")&client_id=$esc.url("myclientid")&client_secret=$esc.url("myclientsecret")"
Result from step 7 of the test tool - Resolve Request Body Template:
""requestTemplate": "grant_type=refresh_token&refresh_token=&client_id=&client_secret=""
Error from API:
"message": "The request could not be understood by the server due to malformed syntax.",
"code": "bad.request",
"status": 400,
"messageParams": {},