# Create Google Shared Drive | Gsuite Business + Accounts

**URL:** <https://onehack.st/t/create-google-shared-drive-gsuite-business-accounts/173384>\
**Category:** Tools & Scripts\
**Tags:** tools, cloud-storage\
**Created:** [February 22, 2021, 8:16am UTC](https://onehack.st/t/create-google-shared-drive-gsuite-business-accounts/173384 "2021-02-22T08:16:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheStrength](https://onehack.st/user_avatar/onehack.st/thestrength/32/46753_2.png) [@TheStrength](https://onehack.st/u/TheStrength)\
**Post date:** [February 22, 2021, 8:16am UTC](https://onehack.st/t/create-google-shared-drive-gsuite-business-accounts/173384/1 "2021-02-22T08:16:45Z")

</div>

![image](https://onehack.st/uploads/default/original/3X/d/4/d4bc920cd9679e2282efd6e372360619e6910d2d.png)

## 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

- Open [https://generator.driveindex.ga](https://generator.driveindex.ga/)
- Authenticate
- Generate Code
- Copy values from `client_id: '', client_secret: '', refresh_token: ''`.
- Paste them in Line 4,5 and 6 at [workers.js](https://github.com/ParveenBhadooOfficial/Create-Google-Shared-Drive/blob/master/workers.js).
- Copy the Code and paste it into [https://workers.cloudflare.com](https://workers.cloudflare.com/) Site.

### Manual and Difficult

- Open [Google Cloud Console](https://console.developers.google.com/apis/credentials)
- After creating project or if you already have one.
- Enable Drive API from [Here](https://console.developers.google.com/apis/library/drive.googleapis.com?q=drive)
- 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](https://developers.google.com/oauthplayground)
- On Right Top Side click on Setting Icon [![Settings](https://camo.githubusercontent.com/c86a3cfb5cbaefa874616cdce7be1a0b9348d8699e558607aa9e2c106befc4ef/68747470733a2f2f646576656c6f706572732e676f6f676c652e636f6d2f6f61757468706c617967726f756e642f6173736574732f696d616765732f73657474696e67732e706e67)](https://camo.githubusercontent.com/c86a3cfb5cbaefa874616cdce7be1a0b9348d8699e558607aa9e2c106befc4ef/68747470733a2f2f646576656c6f706572732e676f6f676c652e636f6d2f6f61757468706c617967726f756e642f6173736574732f696d616765732f73657474696e67732e706e67)
- Click on Use your own OAuth credentials.
- Enter OAuth Client ID: and OAuth Client secret:
- Now back to same page [Developers Playground](https://developers.google.com/oauthplayground) left side Step 1 i.e. Select & authorize APIs
- Find Drive API v3
- Select First Option i.e. [https://www.googleapis.com/auth/drive](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](https://github.com/ParveenBhadooOfficial/Create-Google-Shared-Drive/blob/master/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](https://workers.cloudflare.com/) Site.

## For new users (What to do at Cloudflare exactly)

- Create an account at [Cloudflare.com](https://www.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](https://camo.githubusercontent.com/b9af1d65bd6b5d845593b8957677ece57178f499d3249ae6192cb550bc24adf0/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f67682f5061727665656e426861646f6f4f6666696369616c2f4372656174652d476f6f676c652d5368617265642d4472697665406d61737465722f646e732d776f726b6572732e706e67)](https://github.com/ParveenBhadooOfficial/Create-Google-Shared-Drive)

- 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](https://camo.githubusercontent.com/2ff2604bdaddb7ecf31917b0711d8f5e29b472cf7e4227bb7c7ac38ca0750a30/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f67682f5061727665656e426861646f6f4f6666696369616c2f4372656174652d476f6f676c652d5368617265642d4472697665406d61737465722f726f7574652e706e67)](https://github.com/ParveenBhadooOfficial/Create-Google-Shared-Drive)

- 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.

## GitHub:

[https://github.com/ParveenBhadooOfficial/Create-Google-Shared-Drive](https://github.com/ParveenBhadooOfficial/Create-Google-Shared-Drive)

---

<div class="post-metadata">

**Author:** ![ellokoki](https://onehack.st/user_avatar/onehack.st/ellokoki/32/81053_2.png) [@ellokoki](https://onehack.st/u/ellokoki)\
**Post date:** [February 22, 2021, 4:11pm UTC](https://onehack.st/t/create-google-shared-drive-gsuite-business-accounts/173384/2 "2021-02-22T16:11:15Z")

</div>

error Process Failed!SyntaxError: Unexpected token \< in JSON at position 0

---

<div class="post-metadata">

**Author:** ![Blaken](https://onehack.st/user_avatar/onehack.st/blaken/32/88599_2.png) [@Blaken](https://onehack.st/u/Blaken)\
**Post date:** [February 22, 2021, 5:37pm UTC](https://onehack.st/t/create-google-shared-drive-gsuite-business-accounts/173384/3 "2021-02-22T17:37:59Z")

</div>

Shared Drives Are Good As Long as not Storing personal and Non-Important Data…

PS- The Cloudflare Workers Are Banning Cloudflare Accounts For making Gdrive Indexes
