First functional version

This commit is contained in:
VC
2023-09-29 18:10:10 +02:00
parent 2a3ebf6fe4
commit e664853728
8 changed files with 304 additions and 5 deletions

28
README.md Normal file
View File

@@ -0,0 +1,28 @@
# Obtain Authorization Token from Google
That the complicated part:
* create an OAuth2.0 application with authorization for Youtube DATA Api v3 Upload
* create a OAuth2.0 client with Desktop client
Youll need:
* the `client_id` from your OAuth2.0 client
* the `client_secret` from you OAuth2.0 client
Then enter in:
```
https://accounts.google.com/o/oauth2/v2/auth?client_id=XXX.apps.googleusercontent.com&redirect_uri=urn:ietf:wg:oauth:2.0:oob&scope=https://www.googleapis.com/auth/youtube.upload&response_type=code
```
And accept that your YouTube account might be modified. Youll get a code then; enter this `curl` post:
```
curl -s \
--request POST \
--data "code=[THE_CODE]&client_id=XXX.apps.googleusercontent.com&client_secret=[THE_CLIENT_SECRET]&redirect_uri=urn:ietf:wg:oauth:2.0:oob&grant_type=authorization_code" \
https://accounts.google.com/o/oauth2/token
```
Youll get a Token. The only important part is the `refresh_token`
In your `tootube.toml` config file, put the `refresh_token`.