Salesforce Rest API call from function in Foundry

Hi,

I am working on one project where I need to implement the following functinaltiy:

  1. I have a one app. In this app there is one field where user enter Number (like: SF-12345) and there is button.

  2. On button click I need to pass this field value to API and get the Output and fill the fields accordingly in the same app.

Currently what i have implemented:

  1. Created Rest API data connect and Webhook is returning data correctly in JSON format. In Rest API call there are two hits will go . In first Post request it generated the Token, Once i will get the token . I include this in second Get request and get the output (JSON Format). Till this point it is working fine and getting the desire result.

Now I am facing the following Challenge:

  1. I am creating one funciton that will hit the same API which i created earlier but problem is I am not getting the output (As per my understanding may be Oauth is not verifying it)

Can anyone help me on this how i can get the output

@nittin14 , can you confirm if you have followed all the steps mentioned here - https://www.palantir.com/docs/foundry/functions/webhooks#example-make-multiple-calls-from-a-function ?

Can you explain a bit more on “I am not getting the output” - can you try logging the response from your webhook in the function? Is it just empty?

Finally, when you execute the call from the function, can you check the webhook history page to verify the request was actually sent to the external source?