wow-api-characterinfo/testing.sh

10 lines
917 B
Bash
Raw Normal View History

2024-12-24 09:49:14 -07:00
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_TOKEN_RESPONSE="$(curl -X POST https://oauth.battle.net/token -u $CLIENT_ID:$CLIENT_SECRET -d http://localhost -d grant_type=authorization_code -d code=$CLIENT_ACCESS_TOKEN)"
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'