question

laggyluk avatar image
laggyluk asked

UE4 RequestMultiplayerServer results in InvalidAPIEndpoint error

Trying to request server from client via blueprint. Enabled 'Allow clients to start games' in title settings. Player logs in fine but when calling RequestMultiplayerServer I get InvalidAPIEndpoint error:

LogPlayFab: Request: {

  "BuildId": "9aa2b789-2597-4ddf-a718-57ecd0cd2ead",
  "InitialPlayers": [  "1"  ],
  "PreferredRegions": null,
  "SessionCookie": null,
  "SessionId": null
}
LogPlayFab: Response : {"code":400,"status":"BadRequest","error":"InvalidAPIEndpoint","errorCode":1131,"errorMessage":"The URL for this request is not valid for the requested entity. The correct API endpoint is https://e2005.playfabapi.com/."}

Am I supposed to set more parameters there? Tried using SessionTicket from player login response as SessionId with same result.

unrealmultiplayer
requestserver.png (237.0 KiB)
7 comments
10 |1200

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

Citrus Yan avatar image Citrus Yan commented ·

May I know the exact reproduce steps of this issue?

0 Likes 0 ·
laggyluk avatar image laggyluk Citrus Yan commented ·

rather simple:

login with email address, if successful then request multiplayer server.

title id and endpoint is set in project settings.


editor 4.25 built from source, playfab plugin from github.


0 Likes 0 ·
Citrus Yan avatar image Citrus Yan laggyluk commented ·

What's the title id set in project settings?

0 Likes 0 ·
Show more comments
Show more comments
laggyluk avatar image laggyluk Citrus Yan commented ·

In postman experiments I can see various other errors but relating to "Invalid input parameters" which sounds more reasonable

0 Likes 0 ·
laggyluk avatar image laggyluk commented ·

managed to construct proper request with postman but so far no luck with blueprint

0 Likes 0 ·

1 Answer

·
laggyluk avatar image
laggyluk answered

ok, so I've found a bug:

If TitleId is set in editor project settings>playfab then TitleId gets appended to "Production Environment Url" when building the request header in UPlayFabMultiplayerAPI::Activate()

resulting in invalid url:

"E2005e2005.playfabapi.com"

Bug doesn't happen if instead of using project settings tab I do it via SetPlayfabSettings node from blueprint.

2 comments
10 |1200

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

Citrus Yan avatar image Citrus Yan commented ·

The settings for "Production Environment Url" should be ".playfabapi.com" instead. Could you please update it and see if it works.

0 Likes 0 ·
laggyluk avatar image laggyluk Citrus Yan commented ·

yes it does work, it's gonna be a long road

1 Like 1 ·

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.