Step 1. How To Make credentials.json
1. Video Guide -: GDrive
1. Open Google Cloud Console And Go To "API and services" Section, And Click On "Enable APIs and services".
10. Click On "Application Type*" And Select "Desktop App" Then Click "Create" Then "Download JSON" If JSON Doesn't Download, No Worries, Click "OK" Then Click 'Desktop client 1" And "Download JSON" And "Close".
12. In "API Library" Section Click On "Google Drive API" And Enable It. (You Can Also Search For Google Drive).
13. After Enabling Drive API Go To "OAuth Consent Screen" (In API and services Section) Go To "Data Access" Click "Add or remove scopes" Select "1,2,3" Only (Ex - 1.auth/userinfo.email | 2.auth/userinfo.profile | 3.openid) Then Click "Update" Then Click "Save".
14. After (Task 13.) Click On "Audience" Then Click "Pulish App" And "Confirm". (Now, You May Close Your Browser, Online Work Complete)
15. Open Your File Manager Or Any Other File Explorer Like (MT Manager, ZArchiver, Files Etc...) Then Go To Your Download Folder (/storage/emulated/0/Download) (Which Folder Where The "JSON" a.k.a "client.secret" File Downloaded) Move The "client.secret" File To "Storage" Not Any Folder (/storage/emulated/0/) After "client.secret" File Moved To Storage You Have To Rename The File From "client_secret" To "credentials.json" Done...
Step 2. How To Get token.pickle
How To Generate Token Pickle With Android Easily After Google Auth2.0 New policy update. Without any kind of error.
1. Install Termux F-Droid
2. Open Termux and just copy paste all the commands that described below, Make sure you have internet connection. if you see Y/n then Type y.
apt update && apt upgrade -y && apt install git python3 -y && apt upgrade python3 -y && pkg install python-cryptography && pip install google-api-python-client google-auth-httplib2 google-auth-oauthlib
apt update && apt upgrade
git clone https://github.com/CodeRed-001/TokenPickle
5. make sure Credentials.json file present in your storage not in any folder. if not then just move credentials.json file into the storage. Not in any folder.
termux-setup-storage
cd /sdcard
cp -r credentials.json /data/data/com.termux/files/home/TokenPickle
cd
cd TokenPickle
python3 GenerateTokenPickle.py
12. You'll find a url https://accounts.google.com/o/oauth2/=offline like this. just copy this url and paste on browser and login into your google account. that's it. you'll see 'The authentication flow has completed. You may close this window' this massage. then you're done.
cp -r token.pickle /sdcard
goto your sdcard (phone memory) you'll find token.pickle there.
We're Done.