Hi,
I am using Arduino IoT to send a GET http request to a google app scripts(which is linked to a google sheet but not the issue here). I used this code numourus times with no issues, but now I don't see any exestuations going on the script meaning no request is arriving. This is the http request code on arduino side:
int httpRequest() {
static WiFiClient client;
static const char WEBSITE[] = "script.google.com";
String url = "/macros/s/" + GAS_ID + "/exec?deviceID=" + (String) deviceID
+ "&smA=" + (String) sm[0]
+ "&smB=" + (String) sm[1]
+ "&smC=" + (String) sm[2]
+ "&smD=" + (String) sm[3]
+ "&smE=" + (String) sm[4]
+ "&smF=" + (String) sm[5]
+ "&smG=" + (String) sm[6]
+ "&smH=" + (String) sm[7]
+ "&smI=" + (String) sm[8]
+ "&smJ=" + (String) sm[9]
+ "&smK=" + (String) sm[10]
+ "&smL=" + (String) sm[11]
+ "&smM=" + (String) sm[12]
+ "&smN=" + (String) sm[13]
+ "&smO=" + (String) sm[14]
+ "&smP=" + (String) sm[15];
if (client.connect(WEBSITE, 443)) {
Serial.println("connecting...");
client.print(String("GET ") + url);
client.println(" HTTP/1.1");
client.print("Host: ");
client.println(WEBSITE);
client.println("User-Agent: ArduinoWiFi/1.1");
client.println("Connection: close");
client.println();
Serial.println("Sent data");
lastConnectionTime = millis();
return 1;
} else {
Serial.println("failed to connect to http");
return 0;
}
}
I double checked that the GAS id is correct, I suspect it is some kind of a permission issue but I allowed all users even anonymous to access and edit the script(did it in the first web app publish) Did something change in GAS protocol or I have a mistake here?
I tried also using the same with pushingBox website which there I can see it arriving from arduino side, but still nothing appears in the GAS.
Thanks.