shivang-saxena / google-Drive-API

how to upload file to google drive using golang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

how to upload file to google drive using golang


Languages

Language:Go 100.0%