question

Ivan Kozka avatar image
Ivan Kozka asked

API SetMatchmakingQueue doesn't work

Hello, I must to create queue at realtime , but why api Matchmaking Admin - Set Matchmaking Queue doesn't work?

I get every time this message "Only title entities can call this API". What is the mean?

apissdksMatchmaking
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Ivan Kozka avatar image
Ivan Kozka answered

I solved, how get EntityToken ftom Title

string url = "https://7DCFA.playfabapi.com/Authentication/GetEntityToken";
string json = JsonConvert.SerializeObject(new GetEntityTokenRequest());
StringContent content = new StringContent(json, Encoding.UTF8, "application/json");
HttpClient client = new HttpClient();
client.DefaultRequestHeaders.Add("X-SecretKey", "SecretKey");
string s = await (await client.PostAsync(url, content)).Content.ReadAsStringAsync();
var token = JsonConvert.DeserializeObject<Responses.GetEntityTokenResponse>(s);

Or so

PlayFabApiSettings instanceSetting = new PlayFabApiSettings { TitleId = "TitleId", };
instanceSetting.DeveloperSecretKey = "SecretKey";
PlayFabSettings.TitleId = "TitleId";
var clientAPIInstance = new PlayFabClientInstanceAPI(instanceSetting); 
var titleEntityResponse = await PlayFabAuthenticationAPI.GetEntityTokenAsync(new GetEntityTokenRequest(), null, new Dictionary<string, string> { { "X-SecretKey","SecretKey" }});
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Seth Du avatar image
Seth Du answered

You need to get a title entity token to call this API. To get a title entity token, you can use title secret key to call GetEntityToken API.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Ivan Kozka avatar image Ivan Kozka commented ·

..........

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.