I am trying to service a public website from a Google Cloud SQL database (MySQL).
Since it is a public website, I found out the only way for me to gain access in to use an API Key, and add it it to the request like that: ...?key=FHkdvfio.....
If I understand correctly, the Cloud SQL DB end point should look something like that:
jdbc:google:mysql://<my-instance-ip>:3306/<my-database-name>?key=....
What I could not find, is an example of how to actually send SQL queries from JavaScript using this API Key.
The reason I'm using JavaScript is because the web client is actually Google Apps Script driving a Google Sheet, with its pre-cursor JavaScript language.
Since it is a PUBLIC, ANONYMOUS website, I cannot use any of the Google provided libraries for Apps Script or connection/authentication methods, as the end user is not known, nor identified or logged-into any known Google account from any known IP address. Hence, the API Key method.
Can anyone point me in the right directions please?