So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Yash_r
#93721 Hello Everyone on the Forum,

I am trying to use the ESP-01 using CIPSERVER to connect to an IFTTT service and trying to trigger an event to it along with a JSON payload to update to a linked GoogleSheets service.

But the problem is, however, I send the commands, I always face the "400 Bad Request" error and don't quite know what is going wrong.

I am sending the correct length in the CIPSEND command, but when using GET to send data, it is giving the error.

The detailed log is as follows (also ESP echo is enabled using ATE1 & MY_KEY is replaced with the actual Key from the IFTTT event):

AT+CIPSTART=0,"TCP","maker.ifttt.com",80
AT+CIPSTART=0,"TCP","maker.ifttt.com",80

0,CONNECT

OK
AT+CIPSEND=0,185
AT+CIPSEND=0,185


OK
> GET /trigger/Pot_data/with/key/MY_KEY? HTTP/1.1\r\nHost: maker.ifttt.com Content-Type: application/json\r\n\r\n{"value1":"20","value2":"40","value3":"90"}
:"90"}

busy s...

Recv 185 bytes

SEND OK

+IPD,0,1263:HTTP/1.1 400 Bad Request
Server: CloudFront
Date: Tue, 22 Feb 2022 08:03:19 GMT
Content-Type: text/html
Content-Length: 915
Connection: close
X-Cache: Error from cloudfront
Via: 1.1 1bd5f00ea27576d8ebb7218eb6f7c678.cloudfront.net (CloudFront)
X-Amz-Cf-Pop: HYD50-C3
X-Amz-Cf-Id: W37o6VBFyWDvKimmyCtALhhr_S5jT6ZhFWUIMKN9bV-XMqNQVlrekA==

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>ERROR: The request could not be satisfied</TITLE>
</HEAD><BODY>
<H1>400 ERROR</H1>
<H2>The request could not be satisfied.</H2>
<HR noshade size="1px">
Bad request.
We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
<BR clear="all">
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
<BR clear="all">
<HR noshade size="1px">
<PRE>
Generated by cloudfront (CloudFront)
Request ID: W37o6VBFyWDvKimmyCtALhhr_S5jT6ZhFWUIMKN9bV-XMqNQVlrekA==
</PRE>
<ADDRESS>
</ADDRESS>
</BODY></HTML>0,CLOSED

Can someone please help me understand and resolve the above issue?

Regards,
Yash