Connectdocs

Example

Luau
ws:Send(http:JSONEncode({
    types = "link",
    data = {
        username = plr.Name,
        userid = plr.UserId,
        displayname = plr.DisplayName,
        time = os.time(),
        games = game.GameId,
    }
}))

Fields

FieldTypeDescription
types"link"Message type. Must be "link".
datatableAccount info, see below.

data

FieldTypeDescription
usernamestringAccount name, plr.Name.
useridnumberAccount ID, plr.UserId. Should match the ID in the connect URL.
displaynamestringDisplay name, plr.DisplayName.
timenumberUnix timestamp of when the client connected, os.time().
gamesnumberCurrent experience ID, game.GameId.

Sent as JSON

JSON
{
  "types": "link",
  "data": {
    "username": "x2Neptune",
    "userid": 123456789,
    "displayname": "Neptune",
    "time": 1760140800,
    "games": 994732206
  }
}
Note

Send link once per connection, before any stats messages.