Files
tootube/README.md
2023-10-03 15:33:41 +02:00

29 lines
1017 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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`.