Friend List Management - Add Friend
Adds the Friend user to the friendlist of the user with PlayFabId. At least one of FriendPlayFabId,FriendUsername,FriendEmail, or FriendTitleDisplayName should be initialized.
POST https://titleId.playfabapi.com/Server/AddFriend
Request Header
Name | Required | Type | Description |
---|---|---|---|
X-SecretKey | True |
|
This API requires a title secret key, available to title admins, from PlayFab Game Manager. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
PlayFabId | True |
|
PlayFab identifier of the player to add a new friend. |
FriendEmail |
|
Email address of the user being added. |
|
FriendPlayFabId |
|
The PlayFab identifier of the user being added. |
|
FriendTitleDisplayName |
|
Title-specific display name of the user to being added. |
|
FriendUsername |
|
The PlayFab username of the user being added |
Responses
Name | Type | Description |
---|---|---|
200 OK | ||
400 Bad Request |
This is the outer wrapper for all responses with errors |
Security
X-SecretKey
This API requires a title secret key, available to title admins, from PlayFab Game Manager.
Type:
apiKey
In:
header
Definitions
Add |
|
Api |
The basic wrapper around every failed API response |
Empty |
AddFriendRequest
Name | Type | Description |
---|---|---|
FriendEmail |
|
Email address of the user being added. |
FriendPlayFabId |
|
The PlayFab identifier of the user being added. |
FriendTitleDisplayName |
|
Title-specific display name of the user to being added. |
FriendUsername |
|
The PlayFab username of the user being added |
PlayFabId |
|
PlayFab identifier of the player to add a new friend. |
ApiErrorWrapper
The basic wrapper around every failed API response
Name | Type | Description |
---|---|---|
code |
|
Numerical HTTP code |
error |
|
Playfab error code |
errorCode |
|
Numerical PlayFab error code |
errorDetails |
|
Detailed description of individual issues with the request object |
errorMessage |
|
Description for the PlayFab errorCode |
status |
|
String HTTP code |
EmptyResponse
Error Codes
Name | Code |
---|---|
UsersAlreadyFriends | 1183 |