I've seen people with animated banners. How do people do that?
Example: https://vrchat.com/home/user/usr_eb0d4222-ec99-4312-8d67-f7b207bdc6f7
1 messages · Page 1 of 1 (latest)
I've seen people with animated banners. How do people do that?
Example: https://vrchat.com/home/user/usr_eb0d4222-ec99-4312-8d67-f7b207bdc6f7
sorry for previous spammed posts
import requests
import traceback
print("script started")
BASE = "https://api.vrchat.cloud/api/1"
USERNAME = "User-Here"
PASSWORD = "PASSWORD-HERE"
IMAGE_PATH = r"Location To File"
session = requests.Session()
session.headers.update({
"User-Agent": "VRChatUploader/1.0 (contact: useragentchan)"
})
try:
print("logging in...")
r = session.get(f"{BASE}/auth/user", auth=(USERNAME, PASSWORD))
data = r.json()
print("login response:", r.status_code, data)
# CHECK IF 2FA REQUIRED
if r.status_code == 200 and "requiresTwoFactorAuth" in data:
print("2FA required:", data["requiresTwoFactorAuth"])
code = input("enter 2FA code: ")
r2 = session.post(
f"{BASE}/auth/twofactorauth/totp/verify",
json={"code": code}
)
print("2FA response:", r2.status_code, r2.text)
if r2.status_code != 200:
print("2FA failed")
input("press enter...")
raise SystemExit
print("2FA success")
elif r.status_code != 200:
print("login failed")
input("press enter...")
raise SystemExit
# NOW AUTHENTICATED
print("uploading image...")
with open(IMAGE_PATH, "rb") as f:
files = {
"file": ("APNG.png", f, "image/png")
}
upload = session.post(f"{BASE}/gallery", files=files)
print("upload response:", upload.status_code, upload.text)
except Exception:
print("ERROR:")
traceback.print_exc()
input("done - press enter to exit...")```
tried doing this and it failed with error code
script started
logging in...
login response: 200 {'requiresTwoFactorAuth': ['totp', 'otp']}
2FA required: ['totp', 'otp']
enter 2FA code: 835770
2FA response: 200 {"verified":true}
2FA success
uploading image...
upload response: 400 {"error":{"message":"\"Malformed PNG image data\"","status_code":400}}
done - press enter to exit...```
Which doesn't explain how people got this
if I can't use the API to upload APNG's.#