0

Is it possible to develop a C# code like Arduíno does?

Arduíno Comunicate with Google Script, and Google Script comunicate with Google Spreadsheet.

Arduíno code:

const char* host = "script.google.com";
const int httpsPort = 443;
const char *GScriptId = "AKfycbwd9YkXXXXXXXXXXXXXXXXXXX";
String urlCal = String("/macros/s/") + GScriptId + "/exec?xxx";
String payload =  "{\"command\": \"appendRow\", \
                    \"sheet_name\": \"Sheet1\", \
                    \"values\": ";

client = new HTTPSRedirect(httpsPort);
client->setContentTypeHeader("application/json");
client->connect(host, httpsPort);
client->POST(urlCal, host, payload);
Matt Ellen
  • 11,268
  • 4
  • 68
  • 90
Bruno Yuzo
  • 469
  • 5
  • 18
  • That looks like a simple post request, what part are you having trouble with? – Scott Chamberlain Oct 15 '18 at 18:03
  • This sample code appears to be leveraging an API, counter to what your title implies. – esqew Oct 15 '18 at 18:05
  • I can access Google Script with this code in Arduíno easily. I just want to know if someone have used this same simple method (Post and Request) in C# to access Google Script. After accessing Google Script, it's easy to access Google Spreadsheet. – Bruno Yuzo Oct 15 '18 at 18:26
  • 1
    I didn't do it but I don't see a problem with a simple Post request to Google Script. More information to sending requests in C#: https://stackoverflow.com/questions/4015324/how-to-make-http-post-web-request – Manuel Fuchs Oct 15 '18 at 21:34

0 Answers0