Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions
You are not logged in.
Pages: 1
Hello.
I want to collect visitors name, phone, some attribute and than send this info by RestApi to my php script, which creates new lead in my crm system.
If I use GET method, it works only if my attribute dont have space symbol, otherwise I got error "400 Bad Request" from server, which is shown in chat widget.
If I use Post Method I always get error "400 Bad Request".
What is wrong can be?
Offline
I do not think it's related to LHC itself. More to the script itself. What response you see is the response from server directly. So your php script is not handling request properly.
And i would just use post parameters in body. By choosing request as form data and adding your parameters there. You can always debug be looking to https://github.com/LiveHelperChat/liveh … i.php#L131
Also in rest api response you can use special placeholeders while debuning in text messages like https://doc.livehelperchat.com/docs/bot … n-triggers
{http_code} - https status code returned from request
{http_error} - additional error explanation from curl_error($ch);
{content_raw} - raw response returned from Rest API call without any parsing
{http_data} - Request parameters used for rest api call.
In any case it's problem on your end.
Offline
Also as you are using nginx please check your nginx parameters
Offline
Also as you are using nginx please check your nginx parameters
I think the reason is in custom nginx settings, which should be set. But I cannot do that, because this is virtual hosting.
I checked my script via reqbin dot com and it works fine.
Offline
For sure it does not work as expected. Try debug the place where request is send and use placeholders to debug i wrote.
Offline
Also as i told don’t use special characters in url. Use body tab to send dedicated post parameters or just send as json payload.
Offline
The problem is sold by using tab "Body" in RestApi settings.
Thank you!
Offline
Pages: 1