Skip to content

Latest commit

 

History

History
31 lines (19 loc) · 1.22 KB

README.md

File metadata and controls

31 lines (19 loc) · 1.22 KB

Google-Drive-API

how to upload file to google drive using golang

Using simple command line

Using service account

Why we need serivce account

In server-to-server communication. when we want to upload without user intervention.

  • step 1: To upload using service account create service account from https://console.developers.google.com/iam-admin/serviceaccounts

  • step 2: Download the secret file and give the path in code.

  • step 3: create a folder on google drive and share it with new service account email (client_email) you got in secret file.

    Note: If you will not share folder it will not visible to you afteer upload.

  • step 4: Run the code go run upload.go

For more info