Salesforce REST API

I trying to request Salesforce throught REST API.
I already done with success for authentification ( token)
But GET request doesn’t work, the response is :

  • message: “Request failed with status code 400”
  • name: “AxiosError”
  • code: “ERR_BAD_REQUEST”
  • status: 400

Do you know what is wrong ?

Hi Emilie,

Do you endpoint is working in postman or in other tool than WeWeb?

Yes, it works with Postman, I found first solution.
I tested with a text directly like that :
concatenate(“ Name,NumberOfMonth_retail__c, KazooRetailPrice__c,RentPrice__c FROM ProductReference__c WHERE Name=”,"'Clean et steam’")
and it works correctly
But now, i would like to use weweb variable but it doesn’t work again :frowning:

As you see in the result “Current value” your variable is not interpreted, I think it’s because you’re escaping it. Can you remove the “\” around ?

I tried but I need to add ’ ’ around the text.
So I found a workaround, before to put the value into the weweb variable I use Concatenate function like that : concatenate(“'”,VARIABLE,“'”)
And It works
Thanks a lot for your support. For sure I will back soon with a new question :slight_smile:

1 Like

Glad it helped you! For the next time, be aware you can also do something like “'” + product + “'” (with the + operator)

1 Like