You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
box-o-sand/youtube-api-poking/create-grant-url

21 lines
426 B

#!/usr/bin/env bash
set -o errexit
main() {
[[ "${OOM_CLIENT_ID}" ]] || {
echo "Missing \$OOM_CLIENT_ID"
exit 1
}
local url='https://accounts.google.com/o/oauth2/auth'
url="${url}?client_id=${OOM_CLIENT_ID}"
url="${url}&redirect_uri=urn:ietf:wg:oauth:2.0:oob"
url="${url}&scope=https://www.googleapis.com/auth/youtube"
url="${url}&response_type=code&access_type=offline"
echo "${url}"
}
main "$@"