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 Body

Name Required 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 True
  • string

PlayFab identifier of the player to add a new friend.

Responses

Name Type Description
200 OK
400 Bad Request

This is the outer wrapper for all responses with errors

Security

SecretKey

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

Type: apiKey
In: header

Definitions

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