Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing Google Spreadsheet to Update Fusion Table
    text
    copied!<p>I am having an issue with code I am running in a spreadsheet that updates a fusion table. I run the following code (with the fusion table ID omitted for privacy).</p> <pre><code> function updateFusion() { var tableIDFusion = '##############################' var email = UserProperties.getProperty('email'); var password = UserProperties.getProperty('password'); if (email === null || password === null) { email = Browser.inputBox('Enter email'); password = Browser.inputBox('Enter password'); UserProperties.setProperty('email',email); 'email' UserProperties.setProperty('password', password); } var authToken = getGAauthenticationToken(email,password); deleteData(authToken, tableIDFusion); updateData(authToken, tableIDFusion); SpreadsheetApp.getActiveSpreadsheet().toast(Logger.getLog(), "Fusion Tables Update", 10) } //Google Authentication API this is taken directly from the google fusion api website function getGAauthenticationToken(email, password) { password = encodeURIComponent(password); var response = UrlFetchApp.fetch("https://www.google.com/accounts/ClientLogin", { method: "post", payload: "accountType=GOOGLE&amp;Email=" + email + "&amp;Passwd=" + password + "&amp;service=fusiontables&amp;Source=testing"}); var responseStr = response.getContentText(); responseStr = responseStr.slice(responseStr.search("Auth=") + 5, responseStr.length); responseStr = responseStr.replace(/\n/g, ""); return responseStr; } </code></pre> <p>I continue to get the error: Request failed for <a href="https://www.google.com/accounts/ClientLogin" rel="nofollow">https://www.google.com/accounts/ClientLogin</a> returned code 403. Server response: Error=BadAuthentication (line 97)</p> <p>I understand coding but not much about servers and the way programs interact with each other and the code for my Formula Team's website has been passed to me and this is all a bit over my head and I am not sure what to do.</p> <p>Any help is greatly appreciated!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload