ksw-test avatar image
ksw-test asked

Invalid input parameters RequestMultiplayerServer

I'm trying to use multiplayer by referring to some web pages.

In response to my code, Unity will Unity returned "Invalid input parameters" for my code.

But I don't know what's Invalid.

According to Debug.Log(error.ErrorDetails);, it seems to be System.Collections.Generic.Dictionary`2[System.String,System.Collections.Generic.List`1[System.String]]

And the server request code I use is below.

This will be called when "LoginWithCustomID" is successful.

Thanks to you for reading and to the DeepL translation tool!

    private void RequestMultiplayerServer()
        RequestMultiplayerServerRequest requestData = new RequestMultiplayerServerRequest();
        //requestData.BuildId = System.Guid.NewGuid().ToString();
        requestData.SessionId = System.Guid.NewGuid().ToString();
        requestData.PreferredRegions = new List<string>() { "EastUs" };
        //requestData.PreferredRegions = new List<AzureRegion>() { AzureRegion.EastUs };

        PlayFabMultiplayerAPI.RequestMultiplayerServer(requestData, OnRequestMultiplayerServer, OnRequestMultiplayerServerError);

private void OnRequestMultiplayerServerError(PlayFabError error)

10 |1200

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

1 Answer

Citrus Yan avatar image
Citrus Yan answered

One of the following properties must be defined in the RequestMultiplayerServer request:

BuildId, or BuildAliasParams if you are using alias for your builds:

10 |1200

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

ksw-test avatar image ksw-test commented ·

Thanks for the answer. I was able to successfully create an Alias using Postman and then get the IP address of the Server created with the API from Unity. The question I'm left with is whether this is the right way to go about it. I have read the URL above, but do not fully understand Alias's reasoning. The first is lack of understanding. Does Playfab anticipate my approach described above? Should this Alias possibly be changed every time from Unity? Second, lack of understanding. Is Alias also needed when calling the Server from a non-client terminal? (e.g. Matchmaker). The third incomprehension I'm looking at Microsoft's Japanese documentation, but I can't figure out if Alias changes automatically or if it doesn't change unless I call the API.

Thanks to you for reading

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan ksw-test commented ·

Build alias is basically a management layer on top of serveral builds configured by you, which allows calls to RequestMultiplayerServer to be distributed over multiple builds in a controlled fashion. Alias won't change until you modify it, and yes, Alias is also needed (when you're using alias for your builds) when calling RequestMultiplayerServer from a non-client terminal.

1 Like 1 ·
ksw-test avatar image ksw-test Citrus Yan commented ·

With your help, I understood that this service assumes an API.

The aliases have been hidden in the browser until now, but they are an integral part of the server build?

Thanks for your infomation. I seem to have figured it out.

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.