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

string

This API requires a title secret key, available to title admins, from PlayFab Game Manager.

Request Body

Name Required Type Description
PlayFabId True

string

PlayFab identifier of the player to add a new friend.

FriendEmail

string

Email address of the user being added.

FriendPlayFabId

string

The PlayFab identifier of the user being added.

FriendTitleDisplayName

string

Title-specific display name of the user to being added.

FriendUsername

string

The PlayFab username of the user being added

Responses

Name Type Description
200 OK

EmptyResponse

400 Bad Request

ApiErrorWrapper

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

Name Description
AddFriendRequest
ApiErrorWrapper

The basic wrapper around every failed API response

EmptyResponse

AddFriendRequest

Name Type Description
FriendEmail

string

Email address of the user being added.

FriendPlayFabId

string

The PlayFab identifier of the user being added.

FriendTitleDisplayName

string

Title-specific display name of the user to being added.

FriendUsername

string

The PlayFab username of the user being added

PlayFabId

string

PlayFab identifier of the player to add a new friend.

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

EmptyResponse

Error Codes

Name Code
UsersAlreadyFriends 1183