Skip to main content
Version: 5.7.0

ReceiveUserItemFrom

Retrieves and transfers the gift item from the specified player, who must have previously called giveUserItemTo.

ServiceOperation
userItemsRECEIVE_USER_ITEM_FROM

Method Parameters

ParameterDescription
profileIdThe profile ID of the user who is giving the item.
itemIdThe ID uniquely identifying the user item to be transferred.

Usage

http://localhost:3000
string profileId = "a-user-profileId";
string itemId = "aaa-bbb-ccc-ddd";
SuccessCallback successCallback = (response, cbObject) =>
{
Debug.Log(string.Format("Success | {0}", response));
};
FailureCallback failureCallback = (status, code, error, cbObject) =>
{
Debug.Log(string.Format("Failed | {0} {1} {2}", status, code, error));
};

_bc.UserItemsService.ReceiveUserItemFrom(profileId, itemId, successCallback, failureCallback);
JSON Response
{
"data": {
"item": {
"itemId": "692ac167-ed6a-4539-9513-c7149d7166c2",
"defId": "boost_rapidfire",
"quantity": 1,
"usesLeft": null,
"coolDownStart": -1,
"recoveryStart": -1,
"itemData": {},
"giftedTo": null,
"giftedFrom": null,
"blockId": null,
"createdAt": 1566852144140,
"updatedAt": 1566852144140,
"version": 1,
"maxUses": null,
"coolDownUntil": -1,
"recoveryUntil": -1,
"itemDef": {}
}
},
"status": 200
}