Giter Site home page Giter Site logo

create-google-shared-drive's Introduction

Create Google Shared Drive


Create-Google-Shared-Drive

Get Required Data from

Note: You must have permissions to create shared drive in your account. This doesn't work with GMAIL Accounts, Required Gsuite Business+ Accounts. To check Open Google Drive and try to create Shared Drive first.

Easy and Automatic Way

Manual and Difficult

  • Open Google Cloud Console
  • After creating project or if you already have one.
  • Enable Drive API from Here
  • Click create credentials.
  • Select OAuth client ID.
  • Select Web application.
  • Give it a name. (anything for your own reference)
  • In Authorized JavaScript origins add https://developers.google.com
  • In Authorized redirect URIs add https://developers.google.com/oauthplayground
  • Save and note down your Client ID and Secret
  • Open Developers Playground
  • On Right Top Side click on Setting Icon Settings
  • Click on Use your own OAuth credentials.
  • Enter OAuth Client ID: and OAuth Client secret:
  • Now back to same page Developers Playground left side Step 1 i.e. Select & authorize APIs
  • Find Drive API v3
  • Select First Option i.e. https://www.googleapis.com/auth/drive (Required)
  • Click on Authorize API. and give permissions using your google account.
  • It will turn to Step 2 Exchange authorization code for tokens at the end of authentication.
  • Click on Exchange authorization code for tokens, if it goes to step 3, click on Step 2 yourself.
  • Select the option Auto-refresh the token before it expires.
  • Copy the refresh token and paste in Line 6 of workers.js along with your own Client ID and Secret at Line 4 and Line 5.
  • Copy the Code and paste it into https://workers.cloudflare.com Site.

For new users (What to do at Cloudflare exactly)

  • Create an account at Cloudflare.com
  • Click on Workers and Select Free Plan. (Right side of main Dashboard)
  • Setup an username if you're new, i.e. <username>.workers.dev
  • While <username>.workers.dev won't display anything when accessed using a browsers you can create *.<username>.workers.dev where * can be anything without using dots.
  • Click on create a worker and paste your code in it. rename the worker as you like, it can be anything.
  • Click on Deploy. (Your work is done, next steps are if you're linking custom domain.
  • Add a domain or open dns if already added.

DNS and Workers

  • Add an A Record with your desired name (for example.com it is @ and for mysite.example.com it is mysite) with IP Address 192.2.0.1 make sure Proxy is on i.e. the Cloud color should be Orange.
  • Now click on Workers in Menu.
  • Click on Add Route.

Route

  • Enter your custom website you selected above, for us here it will be example.com/* or mysite.example.com/*, don't forget to add /* or pages like mysite.example.com/anything will not work.
  • Select the worker you just deployed.
  • Click on Save.

Note: Replace example.com here with your own domain name.

Credits

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.