I wrote the procedure to read Google Sheets from Google Charts on this page before. Anyone can read the Sheet data with this method.
Google Charts document describes the method to read Google Sheets with authentication on this page. I tested the method with OAuth this time.
I tested the method, “Example: Using OAuth to access /gviz/tq”.
First, I prepared “OAuth client ID” by following the procedure described below.
I prepared Web Application whose public status is “Test” on OAuth page in Google Cloud Platform. I registered a test user on this Web Application. I also specified the domain name (leafwindow.com) which refers to the Google Sheets.
When I clicked the “Authorize” button with Chrome, the window below was displayed.
The following window was displayed when I clicked the “Authorize” button with Firefox.
Google Charts graphs were displayed when I entered the email address of the registered test user. (We would be required to enter our valid passwords if we are not using Chrome with the registered user’s account.)
<div id="after_data_thinning" style="width: 100%; height: 500px;"></div>
The window below was displayed when I entered the unregistered email address.