ZCC HTTPCall Widget returns JSON array

Hi there,

I have a httpcall widget which is using JSON POST to return an access token.

When reviewing the logs I am receiving the entire response in the body. I am simply wanting to save the access token to a custom variable called zoomToken. I am using the results section of the HttpCall however no matter what i set the path to its always blank..

I have tried $.Data.access_token, $.Data.1.access_token etc etc but still no joy.

Can anyone please shed some light on where i am going wrong?

thanks

hi @simon.parsons ,

Could you share a screenshot of your returned result object, please (blocking out any PII)?

Hi @rehema.zoom

Thank you for the reply..

Here is the result:

{"Message":"Found 1 open jobs for property: 6 Elm Grove, , , London","Status":"Success","HttpStatus":200,"Data":[{"job_id":1156015,"job_number":"J24156015","issued_date":"2024-11-26 09:36:04","order1":"2709673/1","contract_name":"Soveriegn Network Group (SNG) LTD"}]}

I am simply trying to save the contents into variables e.g - job_id, job_number etc etc

I have tried setting the path to Data.job_id but always returns blank..

thanks

Simon

HI @simon.parsons since the ‘data’ field is an array, you need to get the first item in the array.

With the HTTP Call widget, we start counting at ‘1’. Please try:

data.1.job_id