Open this in python: import scratchattach as scratch3 session = scratch3.login("username", "password") conn = session.connect_cloud("change this with your project id, it is in the url EXAMPLE:746702470 ") #replace with your project id client = scratch3.CloudRequests(conn) @client.request def ping(): #called when client receives request print("Ping request received") return "wait 5 seconds" #sends back 'pong' to the Scratch project @client.event def on_ready(): print("Request handler is running") @client.request def foo(argument1): print(f"Data requested for user {argument1}") user = scratch3.get_user(argument1) stats = user.stats() return_data = [] return_data.append(f"Total loves: {stats['loves']}") return_data.append(f"Total favorites: {stats['favorites']}") return_data.append(f"Total views: {stats['views']}") return return_data client.run() #make sure this is ALWAYS at the bottom of your Python file then run it, it should work now! And if it doesn't place a comment then i will try my best to help, and O remix this project else it doesn't work if you try this id, use your own.
Credits to @timmccool