SOLVED

How to auth to wasteof socketio?

Sample code maybe (js code also will be fine)

My current code: connects to API but idk where and how to authenticate (I have token/session)

import os

os.system("pip install python-socketio[client]")
os.system("clear")
import socketio
sio = socketio.Client()

@sio.event
def dsconnect(data):
  print('I received a message!')
  print(data)


@sio.on('updateMessageCount')
def on_message(data):
  print('I received a message!')
  print(data)

@sio.event
def connect():
  print("I'm connected!")
  #sio.emit('login', {'Authorization': api.token})
  

sio.connect("https://api.wasteof.money/")


Jun 10, 2022, 2:29 PM
5 0 25

comments (single view)

@non-biased-news @wynd @ankit_anmol you have to emit an “updateUser” message with your token like this:

socket.emit('updateUser',this.token)

(that’s what’s used for wasteof-client v3)

Also does anyone know how to send chat messages because I can’t figure out how to

I got it working without that

I have no idea how to use node.js, I use python.

What does that do?

View all comments