Unable to get a response with the specified URL when scanning QR code

Hi, I am making an attendance application for my organization, but after following many youtubers, the data from qr code that I scanned didn't appear in my google sheet. Here are my MIT app blocking

and google app script

Is there any mistake I made? or any solution that you can suggest? I assumed that because my email that I used to create a sheet is an organization email, the MIT couldn't send a data to my google sheet due to company's privacy.

Thank you in advance!

1 run DO IT on web.Url. do you have a & BEFORE barcode=?
2. why you add ( and ) at return result?
3. will your qr code change for each user? how do you know who scan the qrcode?
4. how to avoid user take a photo of qrcode and scan at home?

Have you confirmed with your Google Workspace Admin that you can run google apps scripts against your account ?

There are two ways to build an attendance app:

  • schoolroom scans the student, or
  • student scans the schoolroom.

Which approach did you choose?

You could also tidy up your script....

function doGet(e) {
var ss = SpreadsheetApp.openById(<SPREADSHEET ID HERE>);
var sh = ss.getSheetByName(<SHEETNAME HERE>);
var d = new Date().toLocaleString().split(", ");
var date = d[0];
var time = d[1];
var barcode = e.parameter.barcode;
return ContentService.createTextOutput("OK");

Your GET url should look like this:

https://script.google.com/a/macros/<LONG ID HERE>/exec?barcode=[BarcodeScanner1.Result]

sorry for the late reply.

  1. after i run it, it returns https://script.google.com/a/macros/(id)/exec
  2. i have no idea about that, because i followed from youtube. (MIT App Inventor Barcode Scanning Project - YouTube)
  3. yeah, i already generated qr codes for each person, and the only one device will scan those qr.
  4. i tried using pre-filled google form and i found that problem. so, i decided to let one device have an app i invented instead.

I already did it. is the problem related to my company's privacy?

i think it's schoolroom scans the student, because i decided to let one device to scan all qr codes.

i tried and it went like this

even though i have a sheet called "for app"

(i changed row1 to [date, time,barcode] according to your code)
here is a result after i used to scan a qr code

I have not done this app through google API, but web app. Is it the reason why I cannot successfully made an app?

This is starting to look like my NY Marathon sample app. Search this board for Marathon.