Created
July 8, 2018 02:52
-
-
Save y23586/aefdea6bf05e425b2e2a4121bec37e61 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import json | |
import requests | |
from requests.auth import HTTPBasicAuth | |
API = "https://api.vrchat.cloud/api/1" | |
APIKEY = "JlE5Jldo5Jibnk5O5hTx6XVqsJu4WJ26" | |
user = "USERNAME" | |
pw = "PASSWORD" | |
ret = requests.get("{}/auth/user?apiKey={}".format(API, APIKEY), | |
auth=HTTPBasicAuth(user, pw)) | |
print(ret.status_code) # returns 200 | |
print(json.loads(ret.text).keys()) | |
# returns ['id', 'username', 'displayName', 'pastDisplayNames', 'hasEmail', | |
# 'hasPendingEmail', 'obfuscatedEmail', 'obfuscatedPendingEmail', 'emailVerified', | |
# 'hasBirthday', 'unsubscribe', 'friends', 'friendGroupNames', 'blueprints', | |
# 'currentAvatarBlueprint', 'events', 'currentAvatar', 'currentAvatarImageUrl', | |
# 'currentAvatarAssetUrl', 'currentAvatarThumbnailImageUrl', 'status', | |
# 'statusDescription', 'acceptedTOSVersion', 'steamDetails', 'hasLoggedInFromClient', | |
# 'homeLocation', 'tags', 'developerType']) | |
It seems that authToken
is now excluded from the JSON response, so use
authToken = ret.cookies["auth"]
you're crazzy dude! that's real cooking right there!!!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
as of July 8, 2018