0

Hello i am making a script for my telegram bot to link this telegram bot to a google spreadsheets. I'm currently following this series guide https://www.youtube.com/watch?v=gw0tlbpCx5U&index=2&list=PLGGHwNnXfci86dfqIVLc5l391SPk-RX1F on youtube and so far I've gotten till here:

var token = "498597656:AAHeOLuQ2h-CIMwmlFhW0ScagdwQSFa01g4";
var url = "https://api.telegram.org/bot" + token;
var webAppUrl = "https://script.google.com/macros/u/0/s/AKfycbybIPzAHjjXgSVJMvZDEajhbdtpK6rcwZrra-7Q2jyUEOyjkAg/exec"; 

function getMe() {
  var response = UrlFetchApp.fetch(url + "/getMe");
  Logger.log(response.getContentText());
}

function getUpdates() {
  var response = UrlFetchApp.fetch(url + "/getUpdates");
  Logger.log(response.getContentText());
}

function doGet(e) {
  return HtmlService.createHtmlOutput("Hello " + JSON.stringfy(e));
}

But when i try to publish webapp, i get a page not found error, https://script.google.com/macros/u/0/s/AKfycbybIPzAHjjXgSVJMvZDEajhbdtpK6rcwZrra-7Q2jyUEOyjkAg/exec, that is the url of the webapp. Could someone help me? This is the first time im coding so i have been following the youtube guide.

Kos
  • 4,890
  • 9
  • 38
  • 42
  • Possible duplicate of [Google Drive Page Not Found - Sorry, unable to open the file at this time](https://stackoverflow.com/questions/47045209/google-drive-page-not-found-sorry-unable-to-open-the-file-at-this-time) – Kos Dec 26 '17 at 19:19

1 Answers1

0

This script worked fine for me except one small error. Your code says JSON.stringfy, but is should be JSON.stringify. The publish process should be:

Menu => Publish => Deploy as a webapp => Click through all permissions => Click on "Latest code"

enter image description here

Jason Allshorn
  • 1,625
  • 1
  • 18
  • 27