Setup Google Drive 

Setup Google Drive 



Guide by https://github.com/GudMeong/ProjectBish

  1. Login into https://console.developers.google.com/.
  2. Then go to https://console.developers.google.com/apis/library/drive.googleapis.com?q=drive and enable the API, or go to https://console.developers.google.com/flows/enableapi?apiid=drive and from "Select a project where your application will be registered" choose your owned project.
  3. After that back to https://console.developers.google.com/apis/dashboard and go to "Credentials".
  4. Click/Press "+ Create Credentials" from drop down menu choose "OAuth client ID"
    and Choose "Other" if "Other" is not exists just choose "Desktop Application", after that fill the name freely and then "Create" and wait browser to automatically refresh wait browser to automatically refresh and choose "Download".
  5. If there is no "Download" menu just Go-to https://console.developers.google.com/apis/credentials and on OAuth 2.0 Client IDs find credentials you've created before and then click/press "Download" icon, open it and Copy to use it later.

INITIAL STEP IF YOU DON'T HAVE A PROJECT YET:

  1. Go to this link https://console.developers.google.com/flows/enableapi?apiid=drive.
  2. Click/Press "Continue" and wait for browser redirects to new page then "Go to Credentials" wait for browser redirects to new page.
  3. Pop up message will came and choose "Set Up Consent Screen" then it will go to new page.
  4. In new page choose "External" and Click/Press "Click"
  5. Choose name freely and "Save"
  6. Go back to "Add credentials to your project" or Go to "Credential" from navigation menu.
  7. If you click "Credentials" from navigation menu:
    Click/Press "+ Create Credentials" from drop down menu choose "OAuth client ID" Choose "Other" if "Other" is not exists just choose "Desktop Application", fill name freely and then "Create" and wait browser to automatically refresh and choose "Download".
    If you back to tab "Credentials wizard" or "Add credentials to your project":
    Fill the name freely and click/press "Create OAuth Client ID", wait and choose "Download".
  8. Open the file and select all then copy.

==============================================

Setting Heroku ConfigVars via WebBrowser:

  1. Login into heroku and go to https://dashboard.heroku.com/apps/you-app-name/settings
  2. Scroll down a little bit and choose "Reveal Config Vars"
    Put the following key with their respective value:
    G_DRIVE_DATA :- client_secret.json value you've downloaded and copied before.
    G_DRIVE_FOLDER_ID :- a folder where you want to upload your file.
  3. Save it.

Setting Heroku ConfigVars via cmd Userbot:

  1. Open your telegram, and choose any chat you want to run the cmd for.
  2. Type the cmd .set var G_DRIVE_DATA [client_secret.json value you've downloaded and copied before].
    put it without the open bracket ( [ ) and closing bracket ( ] ).
  3. Wait the bot to start again you can read the next step.

==============================================

Generating Credentials Token

  1. Go to your telegram and do command .gdauth.
  2. Go to your BOTLOG group and open the link that sent, follow the instructions in the browser.
  3. After finished following the instruction it will give you code and Copy the code.
  4. Go to your BOTLOG group again and reply the link with that code you copied before.
  5. Then you can test run command with .gd on a file/url.

Go and test it, if failed check carefully what the error says.



Report Page