Social API
The Social API provides a comprehensive suite of features for implementing social interactions in your game or application. It enables real-time communication, social networking, and group management through a combination of RESTful endpoints and WebSocket connections.
Features
Friends System
- Add/remove friends
- Accept/reject friend requests
- Block/unblock users
- View friend list
Party System
- Create and manage parties
- Invite players to parties
- Join/leave parties
- Party management (kick, disband, etc.)
Guild System
- Create and manage guilds
- Guild invitations and membership
- Guild ranks and permissions
- Guild information lookup
- Guild token management
User Management
- User profile lookup
- Guild membership lookup
- Party membership lookup
Authentication
All endpoints require:
- User authentication (
userAuthentication
middleware) - Game validation (
socialGameValidation
middleware) for most endpoints
API Structure
The API is organized into three main sections:
Friends (
/friends/*
)- POST
/friends/add
- Add a friend - GET
/friends
- Get friend list - POST
/friends/block
- Block a user - POST
/friends/accept
- Accept friend request - POST
/friends/reject
- Reject friend request - POST
/friends/remove
- Remove a friend - POST
/friends/unblock
- Unblock a user
- POST
Parties (
/parties/*
)- POST
/parties/create
- Create a party - POST
/parties/invite
- Invite to party - POST
/parties/join
- Join a party - POST
/parties/leave
- Leave a party - POST
/parties/disband
- Disband a party - POST
/parties/kick
- Kick from party - GET
/parties
- List parties
- POST
Guilds (
/guilds/*
)- POST
/guilds/create
- Create a guild - POST
/guilds/invite
- Invite to guild - GET
/guilds/invites
- Get guild invites - GET
/guilds/tokens
- Get guild tokens - POST
/guilds/join
- Join a guild - POST
/guilds/leave
- Leave a guild - POST
/guilds/disband
- Disband a guild - POST
/guilds/promote
- Promote guild member - PATCH
/guilds/:guildId
- Update guild info - GET
/guilds/:guildId
- Get guild info - GET
/guilds
- List guilds
- POST
User Lookup
- GET
/users/:userIdOrUsername
- Get user information - GET
/users/:userId/guild
- Get user's guild - GET
/users/:userId/party
- Get user's party