Skip to main content
Version: SDK-5.11.6

RequestFriend

public BackendReturnObject RequestFriend(string gamerIndate);

Parameter

ValueTypeDescription
gamerIndatestringindate of the gamer to whom a friend request is to be sent

Description

Sends a friend request to the user with the corresponding gamerIndate.

Example

Synchronous

Backend.Friend.RequestFriend("2020-02-11T01:08:12.603Z");

Asynchronous

Backend.Friend.RequestFriend("2020-02-11T01:08:12.603Z", (callback) => 
{
// Post-process
});

SendQueue

SendQueue.Enqueue(Backend.Friend.RequestFriend, "2020-02-11T01:08:12.603Z", (callback) => 
{
// Post-process
});

Return cases

Success cases

When the friend request is successful
statusCode : 204
message : Success

Error cases

When the maximum number of friends setting value is 0 in the social management menu of BACKND Console
statusCode : 403
errorCode : ForbiddenException
message : Forbidden friend, Cannot add friend

When another friend request is made to someone after already sending a friend request
statusCode : 409
errorCode : DuplicatedParameterException
message : Duplicated existReqeustFriendGamer, Duplicated existReqeustFriendGamer

When the recipient's requests are full
statusCode : 412
errorCode : PreconditionFailed
message : maxRequestFriend prerequisites are not met.

When the sender's requests are full
statusCode : 412
errorCode : PreconditionFailed
message : maxSendFriendRequest prerequisites are not met.