In my game, a player can start a challenge with his friend and I want that the challenge can only be started when both the currentPlayerId and his friend already have a score in the leaderboard. But I'm not sure if I should use Server/GetLeaderboard or another API in CloudScript to get the two players leaderboard scores.
First, I check in CloudScript if they are friends before I want to call the leaderboard API.
var resultbl = server.GetFriendsList( { "PlayFabId":friendid, "ProfileConstraints": {"ShowTags":true } }); ... var result = server.GetFriendsList( { "PlayFabId": currentPlayerId, "ProfileConstraints": {"ShowTags":true } }); ...
Which server API should I use to get the currentPlayerId score and his friend's score?