Messages
Link Account
Send a link message right after connecting so the dashboard knows who is online.
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
| Field | Type | Description |
|---|---|---|
types | "link" | Message type. Must be "link". |
data | table | Account info, see below. |
data
| Field | Type | Description |
|---|---|---|
username | string | Account name, plr.Name. |
userid | number | Account ID, plr.UserId. Should match the ID in the connect URL. |
displayname | string | Display name, plr.DisplayName. |
time | number | Unix timestamp of when the client connected, os.time(). |
games | number | Current 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.