/// <summary> /// Revokes access to an item in a user's inventory /// </summary> public static void RevokeInventoryItem(RevokeInventoryItemRequest request, Action <RevokeInventoryResult> resultCallback, Action <PlayFabError> errorCallback, object customData = null) { if (PlayFabSettings.DeveloperSecretKey == null) { throw new Exception("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); } PlayFabHttp.MakeApiCall("/Admin/RevokeInventoryItem", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData); }
public async Task RevokeInventoryItem(string playFabId, string itemInstance) { var reqRevokeInventoryItem = new RevokeInventoryItemRequest { PlayFabId = playFabId, ItemInstanceId = itemInstance }; var result = await PlayFabAdminAPI.RevokeInventoryItemAsync(reqRevokeInventoryItem); if (result.Error != null) { throw new Exception(result.Error.ErrorMessage); } }