Generates the url, but for some reason it's only showing "read" premission.
This commit is contained in:
parent
ffd63c98f6
commit
96107693f7
11
ratatoskr.sh
11
ratatoskr.sh
@ -20,7 +20,16 @@ get_oauth_token() {
|
||||
redirectURI="file://$(realpath ${0})"
|
||||
# get client id and secret
|
||||
curl -s -X POST -d client_name="${softwareName}" -d redirect_uris="://${redirectURI}" "${instanceURL}/api/v1/apps" |
|
||||
jq 'to_entries | .[] | "export \(.key)='\''\(.value)'\''"' > "${configPath}/${configFile}"
|
||||
jq --raw-output '"client_id=\(.client_id)\nclient_secret=\(.client_secret)"' > "${configPath}/${configFile}"
|
||||
# Load the new variables from the configuration file
|
||||
source "${configPath}/${configFile}"
|
||||
# Create the url to get the oauth token
|
||||
local url="${instanceURL}/oauth/authorize?client_id=${client_id}&redirect_uri=${redirectURI}&response_type=code&scope=read+write+follow"
|
||||
echo "Please open the following url in your browser."
|
||||
echo "Copy the generated token, and paste it here."
|
||||
echo
|
||||
echo "${url}"
|
||||
echo
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user