Documentation

AddFriend

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.

Request Details

AddFriendRequest
Request Properties
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.

POST https://{{TitleID}}.playfabapi.com/Client/AddFriend
    Content-Type: application/json
    X-Authentication: <user_session_ticket_value>
{
  "FriendPlayFabId": "29837799"
}
        

Response Details

AddFriendResult
Result Properties
Created (required) Boolean

True if the friend request was processed successfully.

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
  "code": 200,
  "status": "OK",
  "data": {
    "Created": true
  }
}

Authentication

SessionTicket

Possible Error Codes

Name Code
AccountNotFound 1001
UsersAlreadyFriends 1183