Family Center
Family Center acts as Discord's parental controls solution to allow parents to monitor the activities of their teens on Discord. They do not allow parents to view message content, but Discord does share:
- Users messaged (DMs and Group DMs)
- Users called (DMs and Group DMs) in the last week
- Friends added in the last week
- Guilds joined in the last week
- Guilds the teen has sent messages to in the last week
A maximum of 8 accounts can be connected to a single parent.
Definitions
In line with the API, instead of referring to Family Center users as "parents" or "teens" and links as "family", "connected teens", or "my family", the API terminology will be used instead.
- Requestor: This is the user that sends a link request to a different user and acts as the user the linked user is connected to. Can be viewed as the "parent."
- Linked user: This is the user that receives or accepts a link request sent by the requestor and acts as the user the "parent" can view the activity of. Can be viewed as the "teen."
- Link: Represents the connection between requestor and linked user.
Family Center Object
Family Center Structure
| Field | Type | Description |
|---|---|---|
| linked_users | array[linked user object] | List of linked users |
| teen_audit_log | teen audit log object | Audit log of the linked users activity |
| users | array[partial user object] | List of requestors the linked user is connected to |
Linked User Object
Partial user data of an underage user linked to the requestor via Family Center.
Linked User Structure
| Field | Type | Description |
|---|---|---|
| created_at | ISO8601 timestamp | When the link request was sent |
| updated_at | ISO8601 timestamp | When the link status was last updated |
| link_status | integer | The link status of the linked user |
| link_type | integer | The link type |
| requestor_id 1 | snowflake | The ID of the account the linked user is connected to |
| user_id 1 | snowflake | The ID of the linked user |
1 If the link type is 1, the user_id and requestor_id will be the same. See Link Type for more information.
Link Status
Represents the current state of the link.
| Value | Description |
|---|---|
| 1 | The Family Center link request has been sent, but not accepted |
| 2 | The linked user is currently connected to the requestor |
| 3 | The link has been disconnected |
| 4 | The link request was rejected |
| 5 | The link request has expired |
Link Type
Represents what part each user played in the connection.
| Value | Description |
|---|---|
| 1 | The current user accepted the request and is the linked user of the link |
| 2 | The current user sent the request and is the requestor of the link |
Example Linked User
{ "created_at": "2024-07-30T19:49:09.800072+00:00", "updated_at": "2024-07-30T19:55:43.834081+00:00", "link_type": 2, "link_status": 3, "requestor_id": "246877849162743818", "user_id": "801318363472330772"}Linked Users Object
Lists all linked users and requestors. Not to be confused with the Linked User object.
Linked Users structure
| Field | Type | Description |
|---|---|---|
| linked_users | array[linked user object] | List of linked users |
| users | array[partial user object] | List of requestors the linked user is connected to |
Teen Audit Log Object
Audit log of events of the linked user. Visible to both requestors and linked users.
Teen Audit Log Structure
| Field | Type | Description |
|---|---|---|
| teen_user_id | ?snowflake | The ID of the linked user |
| range_start_id | ?snowflake | A snowflake representing the start time of the current 7-day track range |
| actions | array[action object] | Actions the linked user has done |
| users | array[partial user object] | Users referenced in the audit log |
| guilds | array[guild object] | Guilds referenced in the audit log |
| totals | map[integer, integer] | Object keyed by action types with their totals |
Action Structure
| Field | Type | Description |
|---|---|---|
| event_id | snowflake | The ID of the event action |
| user_id | snowflake | The ID of the linked user |
| entity_id | snowflake | The ID of the entity the action relates to (user, guild, or group DM) based off the display type |
| display_type | integer | The display type of the action, detailing what this action involved |
Teen Action Type
Represents a specific teen action.
| Value | Name | Description |
|---|---|---|
| 1 | DM_MESSAGE_SEND | A DM message was sent |
| 2 | GDM_MESSAGE_SEND | A group DM message was sent |
| 3 | MESSAGE_REACT | A message reaction was added |
| 4 | ADD_FRIEND | A friend was added |
| 5 | SEND_CALL | A call was sent |
| 6 | CALL_JOIN | A call was joined |
| 7 | GUILD_JOIN | A guild was joined |
| 8 | GUILD_MESSAGE_SEND | A guild message was sent |
| 9 | GUILD_VC_JOIN | A guild voice channel was joined |
| 10 | GUILD_VOICE_CHANNEL_LEAVE | A guild voice channel was left |
| 11 | CALL_LEAVE | A call was left |
| 12 | CALL_START | A call was started |
| 13 | INVOICE_COMPLETE | An invoice was completed |
Teen Action Display Type
Represents the grouped display type of an action.
| Value | Name | Description |
|---|---|---|
| 1 | USER_ADD | Users added within the last 7 days |
| 2 | GUILD_ADD | Guilds joined within the last 7 days |
| 3 | USER_INTERACTION | Users interacted with in the last 7 days |
| 4 | GUILD_INTERACTION | Guilds interacted with in the last 7 days |
| 5 | USER_CALLED | Users called within the last 7 days |
| 6 | TOTAL_VOICE_MINUTES | Total voice minutes within the last 7 days |
| 7 | PURCHASES | Purchases within the last 7 days |
| 8 | GIFTS | Gifts sent or received within the last 7 days |
Example Teen Audit Log
{ "teen_user_id": "801318363472330772", "range_start_id": "1328607677722394624", "actions": [ { "event_id": "1331144363278860318", "user_id": "801318363472330772", "entity_id": "246877849162743818", "display_type": 3 } ], "users": [ { "id": "246877849162743818", "username": "jay_taelien", "global_name": "Jay", "avatar": "91b7bc37e924f78625f7ea582fdbac5d", "avatar_decoration_data": { "asset": "a_aa2e1c2b3cf05b24f6ec7b8b4141f5fc", "sku_id": "1144056631374647458", "expires_at": null }, "discriminator": "0", "public_flags": 16512, "primary_guild": null } ], "guilds": [], "totals": { "1": 0, "2": 0, "3": 1, "4": 0 }}Endpoints
Get Family Center Overview
GET/family-center/@meReturns a Family Center object.
Get Link Code
GET/family-center/@me/link-codeGenerates the link code for usage in the generated QR code that a linked user receives to give to a requestor.
Response Body
| Field | Type | Description |
|---|---|---|
| link_code | string | The code used to connect a requestor to a linked user, appended to the end of the URL the QR code encodes |
| expires_at | integer | Unix timestamp (in milliseconds) of when the link code expires |
Get Linked Users
GET/users/@me/linked-usersReturns a linked users object.
Create Linked User Request
POST/users/@me/linked-usersCreates a request that appears in the linked user's Family Center. Returns a linked users object on success. Fires a User Update Gateway event.
JSON Params
| Field | Type | Description |
|---|---|---|
| recipient_id | snowflake | The ID of the user the requestor wants to connect to |
| code | string | The link code from the linked user's device |
Modify Linked User
PATCH/users/@me/linked-usersModifies the linked user status of a linked user. Can be invoked by either the linked user or the requestor if used for removing the link. Returns an array of linked user objects on success. Fires a User Update Gateway event.
JSON Params
| Field | Type | Description |
|---|---|---|
| link_status | integer | The new link status of the linked user |
| linked_user_id 1 | snowflake | The ID of the user the linked user or requestor is modifying |
1 If this request is sent to remove a link (setting link_status to 3), the linked_user_id changes depending on if the requestor or linked user is invoking it. If the linked user invokes the request, linked_user_id is the ID of the requestor, otherwise it's the ID of the linked user.
Remove Linked User
DELETE/users/@me/linked-usersRemoves a linked user. Returns a list of linked user objects on success. Fires a User Update Gateway event.
JSON Params
| Field | Type | Description |
|---|---|---|
| linked_user_id | snowflake | The ID of the linked user to remove |