Google offers a cloud console tool for developers and users. You can use this free tool to create an API Key for your Google Drive.
The following steps are performed on Desktop Browser. Steps work on mobile browser as well, if facing issues use Desktop View on browser.
Step 1. Open Google Cloud Console, which is a freemium service offered by Google.
Step 2. Log in with your Google Account and Password to access the Clouse Console.
Step 3. Once successfully logged in, you will be taken to Google Cloud Dashboard Homepage.
Step 4. Tap on the Project icon to create a new project.
Step 5. Here create a New Project.
Step 6. Give the project a name, location, and hit Create.
Step 7. Click on 3 horizontal lines on the left sidebar to open the menu option.
Step 8. Here click on APIs & Credentials and Open Library.
Step 9. An API Library page will open; here, look for Google Drive API and click to open it.
Step 10. Click on Enable button to Turn ON Google Drive API
Step 11. Once enabled, click on Manage.
Step 12. Open Credentials Tab
Step 13. Select Google Drive API from the drop-down menu for Credential Type.
Step 14. Select User data and click Done.
Step 15. Now tap on + Create Credentials on the top of the page.
Step 16. An API key will be generated, copy the key and paste it somewhere as we will need it later.