To authenticate you need to emit identify event with the below data.
-
Load user data via metadata endpoint
- uid is your user id (
user.id
from metadata) - token is
socket_token
from the medata
- uid is your user id (
-
Add
uid
andtoken
parameters to the connection query string -
After connected emit identify event
Payload for the identify event should be:
{
"uid": <metadata.user.id>,
"model": { ...metadata.user },
"authorizationToken": <metadata.socket_token>,
"signature": <metadata.token_signature>,
"uuid": <optional_uuidv4_device_identifier>
}
Once you've been identified, you're required to submit the default filters to receive item updates:
- In most languages, this will look something like
emit('filters', {'price_max': 9999999});
{ "price_max": 9999999 }
[
"init",
{
"authenticated":true,
"serverTime":"2021-11-30T08:30:09.443Z",
"server":"trade:slave-server:GpOfWK",
"id":303119,
"steam_name":"Artemis",
"steam_id":"76561198106192114",
"verified":false,
"hide_verified_icon":false,
"avatar":"https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/4f/4f619bc788f0d41261d2a5ced0e96a281af88479_full.jpg",
"profile_url":"https://steamcommunity.com/id/G0FastMen/",
"balance":1533471521,
"bet_threshold":0,
"total_bet":2147483647,
"total_deposit":2182538,
"withdraw_limit":234118685,
"ref_id":0,
"referral_code":"Artemis",
"muted_until":0,
"mute_reason":"",
"utm_campaign":"",
"is_vac_banned":2,
"whitelisted":false,
"registration_ip":"0.0.0.0",
"steam_level":343,
"registration_timestamp":"2016-07-27 23:20:03",
"total_profit":-689280648,
"roles":[
"super-mod",
"tester",
"support-manager",
"root",
"matchbetting-beta",
"shark",
"admin",
"manager",
"mod"
],
"chat_tag":null,
"uid":303119,
"helper_mod":false,
"mod":true,
"super_mod":true,
"admin":true,
"qa":false,
"deposited":true,
"lvl":119,
"badge_text":null,
"badge_text_localized":null,
"badge_color":null,
"hide_rank":null,
"name":"Artemis"
}
]