wow-api-characterinfo/testing.sh
2024-12-24 20:05:41 -07:00

11 lines
995 B
Bash

CLIENT_ID="a79bae348867427690ca6df9903e4af0"
CLIENT_SECRET="VfFc4JRxn4MpA5zRVut1gPIh6E5WrEC5"
# CLIENT_ACCESS_TOKEN_RESPONSE="$(curl -u $CLIENT_ID:$CLIENT_SECRET -d grant_type=client_credentials https://oauth.battle.net/token)"
# CLIENT_ACCESS_TOKEN=$(echo $CLIENT_ACCESS_TOKEN_RESPONSE | jq -r '.access_token')
OAUTH_ACCESS_CODE="USGUSBUZGNQ29JBWKMVFWHIUKIUXUHWW88"
OAUTH_ACCESS_TOKEN_RESPONSE="$(curl -X POST https://oauth.battle.net/token -u $CLIENT_ID:$CLIENT_SECRET -d http://localhost:5635/login_success -d grant_type=authorization_code -d code=$OAUTH_ACCESS_CODE)"
# OAUTH_ACCESS_TOKEN=$(echo $OAUTH_ACCESS_TOKEN_RESPONSE | jq -r '.access_token')
echo $OAUTH_ACCESS_TOKEN_RESPONSE
# curl -H "Authorization: Bearer $CLIENT_ACCESS_TOKEN" "https://us.api.blizzard.com/data/wow/token/?namespace=dynamic-us" | jq
# curl -H "Authorization: Bearer $CLIENT_ACCESS_TOKEN" "https://us.api.blizzard.com/data/wow/guild/proudmoore/stellar/roster?namespace=profile-us" | jq '.members[].character.name'