Friend List Management - Add Friend
Adds the PlayFab user, based upon a match against a supplied unique identifier, to the friend list of the local user. At least one of FriendPlayFabId,FriendUsername,FriendEmail, or FriendTitleDisplayName should be initialized.
POST https://titleId.playfabapi.com/Client/AddFriend
Request Header
Name | Required | Type | Description |
---|---|---|---|
X-Authorization | True |
string |
This API requires a client session ticket, available from any Client Login function. |
Request Body
Name | Type | Description |
---|---|---|
FriendEmail |
string |
Email address of the user to attempt to add to the local user's friend list. |
FriendPlayFabId |
string |
PlayFab identifier of the user to attempt to add to the local user's friend list. |
FriendTitleDisplayName |
string |
Title-specific display name of the user to attempt to add to the local user's friend list. |
FriendUsername |
string |
PlayFab username of the user to attempt to add to the local user's friend list. |
Responses
Name | Type | Description |
---|---|---|
200 OK | ||
400 Bad Request |
This is the outer wrapper for all responses with errors |
Security
X-Authorization
This API requires a client session ticket, available from any Client Login function.
Type:
apiKey
In:
header
Definitions
Name | Description |
---|---|
Add |
|
Add |
|
Api |
The basic wrapper around every failed API response |
AddFriendRequest
Name | Type | Description |
---|---|---|
FriendEmail |
string |
Email address of the user to attempt to add to the local user's friend list. |
FriendPlayFabId |
string |
PlayFab identifier of the user to attempt to add to the local user's friend list. |
FriendTitleDisplayName |
string |
Title-specific display name of the user to attempt to add to the local user's friend list. |
FriendUsername |
string |
PlayFab username of the user to attempt to add to the local user's friend list. |
AddFriendResult
Name | Type | Description |
---|---|---|
Created |
boolean |
True if the friend request was processed successfully. |
ApiErrorWrapper
The basic wrapper around every failed API response
Name | Type | Description |
---|---|---|
code |
integer |
Numerical HTTP code |
error |
string |
Playfab error code |
errorCode |
integer |
Numerical PlayFab error code |
errorDetails |
object |
Detailed description of individual issues with the request object |
errorMessage |
string |
Description for the PlayFab errorCode |
status |
string |
String HTTP code |
Error Codes
Name | Code |
---|---|
UsersAlreadyFriends | 1183 |