Where do I get Google Drive Folder, Shared Drive, or File ID?
Published 24 May 2022 09:00 (2-minute read)
Google Drive uses an ID-based storage system to identify the folders and files. This unique identifier for objects in Google Drive can be found in the URL when you open the needed object.
Get the Folder ID
Getting the Folder ID in Google Drive is easy. Just go to drive.google.com/drive/my-drive and open the folder you need.
After you opened the folder, the URL changes to something like this: "https://drive.google.com/drive/folders/{folder-id}". The Folder ID is in my case "1erCjLjJqqchkdTcy7bxJdHA74lUKXCX1".
You can use the "{folder-id}" wherever you need to get a unique link to the specific folder.
Get the File ID
When you open a File from Google Drive, it will open an extra tab. That tab contains the unique File ID. Here you see the URLs used by Google to identify the File based on the unique ID:
- Google Spreadsheets: docs.google.com/spreadsheets/d/{file-id}/edit
- Google Docs: docs.google.com/document/d/{file-id}/edit
- Google Slides: docs.google.com/presentation/d/{file-id}/edit
- Google Forms: docs.google.com/forms/d/{file-id}/edit
- Other file: drive.google.com/file/d/{file-id}/view
To open a specific file, you can enter it in this generic URL that will redirect to the correct file viewer. This URL is: drive.google.com/open?id={file-id}
Get the Shared Drive ID
To retrieve the Shared Drive ID from your Google Drive, you navigate to the drive.google.com/drive/shared-drives and select the needed Shared Drive.
In my case, the Shared Drive ID I needed was "0ABtjpQ8vsfWSUk9PVA". This can be found in the URL (something like this: "https://drive.google.com/drive/folders/{shared-drive-id}") visible when you opened the root directory of the Shared Drive.