You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fill up rest of the fields. Meaning of each fields are discussed below:
49
-
- BOT_TOKEN : The telegram bot token that you get from @BotFather
50
-
- GDRIVE_FOLDER_ID : This is the folder ID of the Google Drive Folder to which you want to upload all the mirrors.
51
-
- DOWNLOAD_DIR : The path to the local folder where the downloads should be downloaded to
52
-
- DOWNLOAD_STATUS_UPDATE_INTERVAL : A short interval of time in seconds after which the Mirror progress message is updated. (I recommend to keep it 5 seconds at least)
53
-
- OWNER_ID : The Telegram user ID (not username) of the owner of the bot
54
-
- AUTO_DELETE_MESSAGE_DURATION : Interval of time (in seconds), after which the bot deletes it's message (and command message) which is expected to be viewed instantly. Note: Set to -1 to never automatically delete messages
55
-
- IS_TEAM_DRIVE : (Optional field) Set to "True" if GDRIVE_FOLDER_ID is from a Team Drive else False or Leave it empty.
56
-
- INDEX_URL : (Optional field) Refer to https://github.com/maple3142/GDIndex/ The URL should not have any trailing '/'
57
-
51
+
-**BOT_TOKEN** : The telegram bot token that you get from @BotFather
52
+
-**GDRIVE_FOLDER_ID** : This is the folder ID of the Google Drive Folder to which you want to upload all the mirrors.
53
+
-**DOWNLOAD_DIR** : The path to the local folder where the downloads should be downloaded to
54
+
-**DOWNLOAD_STATUS_UPDATE_INTERVAL** : A short interval of time in seconds after which the Mirror progress message is updated. (I recommend to keep it 5 seconds at least)
55
+
-**OWNER_ID** : The Telegram user ID (not username) of the owner of the bot
56
+
-**AUTO_DELETE_MESSAGE_DURATION** : Interval of time (in seconds), after which the bot deletes it's message (and command message) which is expected to be viewed instantly. Note: Set to -1 to never automatically delete messages
57
+
-**IS_TEAM_DRIVE** : (Optional field) Set to "True" if GDRIVE_FOLDER_ID is from a Team Drive else False or Leave it empty.
58
+
-**USE_SERVICE_ACCOUNTS**: (Optional field) (Leave empty if unsure) Whether to use service accounts or not. For this to work see "Using service accounts" section below.
59
+
-**INDEX_URL** : (Optional field) Refer to https://github.com/maple3142/GDIndex/ The URL should not have any trailing '/'
60
+
-**API_KEY** : This is to authenticate to your telegram account for downloading Telegram files. You can get this from https://my.telegram.org DO NOT put this in quotes.
61
+
-**API_HASH** : This is to authenticate to your telegram account for downloading Telegram files. You can get this from https://my.telegram.org
62
+
-**USER_SESSION_STRING** : Session string generated by running:
63
+
```
64
+
python3 generate_string_session.py
65
+
```
58
66
Note: You can limit maximum concurrent downloads by changing the value of MAX_CONCURRENT_DOWNLOADS in aria.sh. By default, it's set to 2
59
67
60
68
## Getting Google OAuth API credential file
61
69
62
-
- Visit the Google Cloud Console
70
+
- Visit the [Google Cloud Console](https://console.developers.google.com/apis/credentials)
63
71
- Go to the OAuth Consent tab, fill it, and save.
64
72
- Go to the Credentials tab and click Create Credentials -> OAuth Client ID
65
73
- Choose Other and Create.
66
74
- Use the download button to download your credentials.
67
75
- Move that file to the root of mirror-bot, and rename it to credentials.json
76
+
- Visit [Google API page](https://console.developers.google.com/apis/library)
77
+
- Search for Drive and enable it if it is disabled
68
78
- Finally, run the script to generate token file (token.pickle) for Google Drive:
# Using service accounts for uploading to avoid user rate limit
99
+
For Service Account to work, you must set USE_SERVICE_ACCOUNTS="True" in config file or environment variables
100
+
Many thanks to [AutoRClone](https://github.com/xyou365/AutoRclone) for the scripts
101
+
## Generating service accounts
102
+
Step 1. Generate service accounts [What is service account](https://cloud.google.com/iam/docs/service-accounts)
103
+
---------------------------------
104
+
Let us create only the service accounts that we need.
105
+
**Warning:** abuse of this feature is not the aim of autorclone and we do **NOT** recommend that you make a lot of projects, just one project and 100 sa allow you plenty of use, its also possible that overabuse might get your projects banned by google.
106
+
107
+
```
108
+
Note: 1 service account can copy around 750gb a day, 1 project makes 100 service accounts so thats 75tb a day, for most users this should easily suffice.
0 commit comments