Skip to content

Instantly share code, notes, and snippets.

@y23586
Created July 8, 2018 02:52
Show Gist options
  • Save y23586/aefdea6bf05e425b2e2a4121bec37e61 to your computer and use it in GitHub Desktop.
Save y23586/aefdea6bf05e425b2e2a4121bec37e61 to your computer and use it in GitHub Desktop.
#!/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'])
@y23586
Copy link
Author

y23586 commented Jul 8, 2018

as of July 8, 2018

@y23586
Copy link
Author

y23586 commented Jul 8, 2018

It seems that authToken is now excluded from the JSON response, so use

authToken = ret.cookies["auth"]

Copy link

ghost commented Jul 2, 2024

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