Hi guys, I have this problem with HTTP Request.
In my workflow I want to send SMSs automaticly to our customers via Cloudtalk API. The problem is, for a long time it worked perfectly but recently when I wanted to send a SMS, error 400 appears “Bad request”. It’s weird, because all data are correct. Moreover, when I copy these data like customer’s number, agent’s number and the message and hard-code them into the node, it works properly.
The thing is the error appears from nowhere and vanish just like that after one day. Sometimes it’s relate with particular phone number, sometimes with all of them.
Did anybody have had the same issue?
hi @Igor_Ziemczyk
It looks like this could be caused by hidden characters or white spaces being passed into the fields via expressions, encoding inconsistencies across data sources, Cloudtalk API throttling, or general instability. I’d suggest adding a Set node before it to sanitize the data and clear those fields.
Thank you for the answer! The problem is there is no, for example, white spaces. We keep those numbers in n8n database. There is no additional data, white spaces etc. There is no spaces at all in the whole phone number, eg. “+48123123123”. Additionaly I added “trim()” function to double check. Morover the message content is create by “set” node.
The stragnest thing is, that the error came from nowhere, appears for 1 day and disappear, just like that. To be more precise, to looked like this:
- One day problem appears for number belongs to Agent A
- The next day problem has been passed to the Agent B
- Then for few hours no numbers was working properly
- Problem vanished
It was a glitch in the Matrix . It came, it saw, it confused everyone, and then it deleted its own browser history. 
Exacly haha. The most annoying thing is, there is only error message “error 400, bad request” and some useless data. No more info 
Unfortunately Cloudtalk support claims there is no problme on their site. The messages are sending not really ofthen, more like a 10-20 in hours 08:00 - 22:00 but I’ll ask them about the rate limiting as I’ll try to refresh the credentials.
Also I started to think that maybe the customer’s phone numbers are fake, unvalid or unactive. I’ve checked some of them with online tools, but I do not really trust these tools. Morover event If I checked them, only one appears to be fake out of 15 of them
That could make sens, because when I hard coded the customer’s, setter’s phone number and the message I could not send it. But I can send the message with the same setter’s phone number and message to my own phone number, but I as I said do not have trustful tool to check these numbers. And That started pretty soon, and now I happends every day. Some of the messages are able to be send, some of them not really.