Jump to content

How do I create credentials in the Google Cloud Console to enable LSL to access my Google Sheet?


Innula Zenovka
 Share

You are about to reply to a thread that has been inactive for 107 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I want to post data to a google sheet and later retrieve it using shared media.

To  access the data and read it, I'm going to need to set up credentials for my inworld app.  

ChatGPT provides the following advice:

Quote

Step 1: Create a Google Cloud Platform Project
Go to the Google Cloud Platform Console: Navigate to Google Cloud Console.
Sign in: Use your Google account to sign in.
Create a New Project: Click on "Select a project" at the top, then click "NEW PROJECT". Give your project a name and click "CREATE".
Step 2: Enable the Google Sheets API
Open the API Library: In the Google Cloud Console, go to the navigation menu (☰), select "APIs & Services", and then "Library".
Search for the Google Sheets API: Use the search bar to find the "Google Sheets API".
Enable the API: Click on the Google Sheets API and then click "ENABLE" to activate it for your project.
Step 3: Configure OAuth Consent Screen
Open the OAuth Consent Screen Settings: In the Google Cloud Console, go to the navigation menu, select "APIs & Services", and then "OAuth consent screen".
Set Up the Consent Screen: Choose "External" for user type and click "CREATE". Fill out the required fields like the app name, user support email, and developer contact information. Click "Save and Continue" through each section until you complete the setup.
Step 4: Create Credentials
Open the Credentials Page: In the Google Cloud Console, go to the navigation menu, select "APIs & Services", and then "Credentials".
Create Credentials: Click "CREATE CREDENTIALS" and select "OAuth client ID".
Configure OAuth Client ID: Select "Web application" as the Application type. Under "Authorized JavaScript origins", add the URI where your application will run (e.g., http://localhost:8000 for local development). Under "Authorized redirect URIs", add the URI where you will handle the OAuth 2.0 response (e.g., http://localhost:8000/oauth2callback).
Create the OAuth Client ID: Click "CREATE" and note down your Client ID and Client Secret.

I've got as far as the third step of  Step 4:  Create Credentials.   

Quote

Configure OAuth Client ID: Select "Web application" as the Application type. Under "Authorized JavaScript origins", add the URI where your application will run (e.g., http://localhost:8000 for local development). Under "Authorized redirect URIs", add the URI where you will handle the OAuth 2.0 response (e.g., http://localhost:8000/oauth2callback).

My LSL will be calling llRequestURL.   What URI should I enter, given that (I assume) it needs to be persistent?

Edited by Innula Zenovka
  • Thanks 1
Link to comment
Share on other sites

I think there's a step missing. Your project needs a service (like a Cloud Function or a Cloud Run Service) which gets a static URL. You make requests to that service, and then that service (in your project with the API enabled) will access Google Sheets. APIs are enabled at project-level because each API has different pricing quotas on them.

Edited by Wulfie Reanimator
  • Thanks 1
Link to comment
Share on other sites

You don't need the Google Cloud Platform. You just need a Google App Script as a go-between your LSL script and your Google Sheet. Google App Script is free and easy to use if you know Javascript. I've used a Google App Script to a Sheet for about 10 years and haven't had to pay a penny.
 


 

Edited by Gayngel
  • Thanks 2
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 107 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...