forked from vern/scripts
7 lines
433 B
Bash
Executable File
7 lines
433 B
Bash
Executable File
#!/bin/bash
|
|
client_id="$(curl -s https://pt.vern.cc/api/v1/oauth-clients/local | jq -r '.client_id')"
|
|
client_secret="$(curl -s https://pt.vern.cc/api/v1/oauth-clients/local | jq -r '.client_secret')"
|
|
curl -s -X POST \
|
|
-d "client_id=${client_id}&client_secret=${client_secret}&grant_type=password&response_type=code&username=root&password=$(cat ~/priv/peertube-pass)" \
|
|
https://pt.vern.cc/api/v1/users/token | jq -r '.access_token'
|