

The first is the path to the credentials.json file we downloaded from google developer console, as always don’t share your credentials with anyone these shouldīe stored save and secure for only your team to access. Add constantĪt the top of my program class i am going to create a couple of constants. You will need to include the 3 nuget package. Of project you create but for this example we are going to keep it simple and just use a console app. net core console application, but you can use service accounts, with libraries or with asp.

You should consider using a service account if you are going to be accessing private data that you the developer own, if you are going to be accessing data that belongs to another user then you should be using Oauth2. It’s that simple there will be no need for user interaction and a consent screen to popup. To upload to that directory on my google drive account. So I can take the service accounts email address and share with it a directory on my Google Drive account then it will have access You can pre authorize a service account granting it access to your data. Think of a service account as a dummy user. There are a lot of use cases for accessing the Google Drive API v3 with a service account. This Tutorial was completely rewritten in April, 2021
