{"id":16238098,"url":"https://github.com/nparashar150/google_drive_handler","last_synced_at":"2025-03-19T16:30:34.822Z","repository":{"id":124223599,"uuid":"442216787","full_name":"nparashar150/Google_Drive_Handler","owner":"nparashar150","description":"Google Drive file upload and delete script.","archived":false,"fork":false,"pushed_at":"2022-01-21T09:35:16.000Z","size":910,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T19:43:27.278Z","etag":null,"topics":["gcp","google-drive-api","googleapis","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nparashar150.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-27T16:44:39.000Z","updated_at":"2023-03-27T11:24:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"8df34b7e-c748-426f-9d0f-24c3f28fe0b4","html_url":"https://github.com/nparashar150/Google_Drive_Handler","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nparashar150%2FGoogle_Drive_Handler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nparashar150%2FGoogle_Drive_Handler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nparashar150%2FGoogle_Drive_Handler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nparashar150%2FGoogle_Drive_Handler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nparashar150","download_url":"https://codeload.github.com/nparashar150/Google_Drive_Handler/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244006137,"owners_count":20382436,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gcp","google-drive-api","googleapis","nodejs"],"created_at":"2024-10-10T13:38:48.479Z","updated_at":"2025-03-19T16:30:34.817Z","avatar_url":"https://github.com/nparashar150.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Upload to your Google Drive with terminal itself \n\n#### Steps to get started with the Script\n1. Clone the Repository\n2. Create .env File \n3. Create a Project at [GCP](https://console.cloud.google.com/)\n4. Enable Google Drive API under Enable API and Services\n![Enable_API](https://raw.githubusercontent.com/nparashar150/Google_Drive_Handler/main/assets/Enable_API.png)\n5. Under API and Services Generate a OAuth 2.0 Client ID\n6. Pase `https://developers.google.com/oauthplayground` as Redirect URI inside the OAuth 2.0 Client ID\n![Generate_OAuth_Credentials](https://raw.githubusercontent.com/nparashar150/Google_Drive_Handler/main/assets/Generate_OAuth_Credentials.png)\n7. Whitelist your Email Address Under OAuth Consent Screen section\n![WhiteList_Email](https://raw.githubusercontent.com/nparashar150/Google_Drive_Handler/main/assets/WhiteList_Email.png)\n8. Go to [OAuthPlayground](https://developers.google.com/oauthplayground)\n9. Select Google Drive V3 and Paste your Client Id and Client Secret\n![Generate_Refresh_Token](https://raw.githubusercontent.com/nparashar150/Google_Drive_Handler/main/assets/Generate_Refresh_Token.png)\n10. Exchange Authorization code with Refresh Token and Access Token\n![Authorization_Code_Exchange](https://raw.githubusercontent.com/nparashar150/Google_Drive_Handler/main/assets/Authorization_Code_Exchange.png)\n11. Add the following inside your .env file which you created earlier \n\n\n   |  | KEY           |   | value            |\n   |--|---------------|---|------------------|\n   |  | CLIENT_ID     |   | yourClientID     |\n   |  | CLIENT_SECRET |   | yourClientSecret |\n   |  | REDIRECT_URI  |   | yourRedirectURI  |\n   |  | REFRESH_TOKEN |   | yourRefreshToken |\n   \n12. Place your file at the dir\n13. Install required packages\n14. **Note**: To upload the file run yarn upload \"fileName\" \"mimeType\" \"folderId (if you want to upload inside a folder)\"\n15. **Note**: To delete the file you need the files' FILEID and run it as yarn delete 'FILEID'\n16. **Note**: To create a folder you need to run yarn createFolder 'folderName'\n![Example_Code](https://raw.githubusercontent.com/nparashar150/Google_Drive_Handler/main/assets/Example_Code.png)\n17. Once you are done the setup you only need to run follow Steps after Step 11 everytime.\n\n#### Star the Repository if you like my work\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnparashar150%2Fgoogle_drive_handler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnparashar150%2Fgoogle_drive_handler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnparashar150%2Fgoogle_drive_handler/lists"}