To be able to connect your PHP Web Application to Google Cloud and access your enabled Google Sheets API, you will be needing a valid credential that would authenticate your registered application. This is important because requests made from anonymous applications are rejected.
Requirements:
- Google Account
- Google Cloud Project
- Google OAuth Consent Screen
Step 1.
Click the following
- Navigation Menu
- APIs & Services
- Credentials
Step 2.
Click “CREATE CREDENTIALS” and click “OAuth client ID“.
Step 3.
Click “Application type*“.
Click “Web application“.
For this test, we will be trying the web application”.
Step 4.
Input the “name“.
For this test, input “http://localhost” to the “Authorized redirect URIs“. This is required for this is where the API server will redirect the user after the user completes the authorization flow.
Leave “Authorized JavaScript origins” empty for this test.
Click “CREATE“.
Done.
A Google OAuth client credential has been created.
Download and secure the JSON format for later usage.
Leave a Reply