Access
Connect cross-platform accounts & identity management
AccelByte Cloud’s Friends service allows players to connect socially with other players. This service uses WebSocket to ensure all players get real-time updates about their Friend List. Players can manage their friends in several different ways, including:
Permissions (opens new window) are used to grant access to specific resources within our services. Make sure your account has the following permissions before you attempt to manage friends in the Admin Portal.
Usage | Resource | Action |
Add Friends Without Confirmation | NAMESPACE:{namespace}:USER:{userId}:FRIENDS | Create |
Get List of Friends | NAMESPACE:{namespace}:USER:{userId}:FRIENDS | Read |
Get Blocked Players by User ID | ADMIN:NAMESPACE:{namespace}:USER:{userId}:PLAYER:BLOCK | Read |
Get Players Who Blocked This Player by User ID | ADMIN:NAMESPACE:{namespace}:USER:{userId}:PLAYER:BLOCK | Read |
Configure a New 3rd Party Integration | ADMIN:NAMESPACE:{namespace}:THIRDPARTY:CONFIG | Create |
Permissions work slightly differently depending on whether they are assigned to IAM Clients (opens new window) or Roles (opens new window) assigned to users. For more information, read the Authentication and Authorization (opens new window).
You can search for a player’s account information using their Display Name or Username as the query. You can configure the type of search by setting the enum of SearchType for Unity and EAccelByteSearchType for Unreal to DisplayName or Username.
These are all features for how players can manage their friends.
You can retrieve a player’s public code using the PublicId parameter.
Use the following function to retrieve a friends list.
The first step in making a friend is sending a friend request to another player. Use this code to send a friend request using a User ID.
The first step in making a friend is sending a friend request to another player. Use this code to send a friend request using a Public Code.
Use this function to retrieve all the information about incoming friend requests. This function retrieves user ID which you can use to accept or reject each request.
After a friend request has been sent, the player who received the request can either accept or reject it. Use the following function to accept a friend request.
NOTE
To see a list of incoming friend requests, you can retrieve a list of incoming friend requests.
You can reject the incoming friend request by their User ID. To get the user ID, you need to retrieve a list of incoming friend requests, copy the User ID, and store it somewhere safe for use in the following function.
Use the following function to retrieve a list of outgoing friend requests.
You can cancel outgoing friend requests using User ID. To get the user ID, you need to retrieve a list of outgoing friend requests, copy the User ID, and store it somewhere safe for the following function.
Use the following function to unfriend another player.
When a player sends a friend request to another player, the receiver will get an incoming friend request notification. You’ll need to set up a delegate to enable this notification. Use the following function to implement the delegate for incoming friend request notifications.
Use the following function to set up a notification for when your friend accepts your friend request.
Use the following function to set up a notification for when a player rejects your friend request.
Use the following function to set up a notification when another player cancels their friend request.
Use this function to set up a notification when a player unfriends another player.
Blocking allows players to restrict other players from interacting with them. When one player blocks another, both players are prevented from:
Use the following function to block a player.
The game needs to know if a player has been blocked by another player to avoid matching blocked players together and other similar tasks. Blocking events can be tracked by subscribing to the below event. The event will be raised on the blocked player side and will pass data that contains both the blocking player and blocked player’s user IDs.
Use the following function to unblock a player
Just like the Player Blocked Event, this event will be raised on the unblock player’s side and will pass data that contains both the unblocking player and unblocked player’s User IDs.
Use the following function to retrieve a list of currently blocked players. This method has a callback that returns an array of data containing the blocked players’ User IDs.
Use the following function to retrieve a list of blocked players specific to a certain user, based on their User ID.
Use the following function to retrieve a list of players that have blocked the current player. This method has a callback that returns an array of data that contains the blocking player’s User ID.
Use the following function to retrieve a list of players that have been blocked by a specific player, using that player’s User ID.
This process is used to connect players’ friends from 3rd-party platforms to AccelByte Cloud’s IAM service. This process works in the background and is triggered automatically every time your game starts, or manually by interaction between a player and the game client.
To allow your players to sync their 3rd-party platform friends lists with their AccelByte Cloud friends list, you must call user.BulkGetUserByOtherPlatformUserIds() and lobby.BulkRequestFriend() consecutively.