Search code examples
google-apigoogle-drive-apigoogle-drive-shared-drive

How to get teamDriveId when use google-drive-api?


I use google-drive-api to get list of files.

I see a parameter named teamDriveId,I don't know where I can get the value of this parameter.

Can you get teamDriveId from the response of a method of this api?

Which method did you get it from?

I see team drive from here.

Team Drives are only available to G Suite Business and G Suite Enterprise customers.

enter image description here


Solution

  • The teamDriveID could be found at the last part of the URL of your Team Drive. it can easily be identified because of it's unique alpha-numeric combination.

    See example below:

    https://drive.google.com/corp/drive/folders/AbCDeFgH-123XXx
    

    See this post from Gsuite Help Forum.