question

Jonathan Crowe avatar image
Jonathan Crowe asked

Tying to get build Aliase info from the command line

Following the docs @ https://learn.microsoft.com/en-us/gaming/playfab/features/multiplayer/servers/allocating-with-build-alias

I'm unable to access or list build alasis.

Using command http GET https://TITLEID.playfabapi.com/ X-SecretKey:MYKEY Content-Type:application/json

I can get a successful response.

 Access-Control-Allow-Credentials: true
 Access-Control-Allow-Headers: Content-Type, Content-Encoding, X-Authentication, X-Authorization, X-PlayFabSDK, X-ReportErrorAsSuccess, X-SecretKey, X-EntityToken, Authorization, x-ms-app, x-ms-client-request-id, x-ms-user-id, traceparent, tracestate, Request-Id
 Access-Control-Allow-Methods: GET, POST
 Access-Control-Allow-Origin: *
 Connection: keep-alive
 Content-Encoding: deflate
 Content-Length: 204
 Content-Type: application/json
 Date: Tue, 28 Feb 2023 06:05:12 GMT
 Server: nginx
 Vary: Accept-Encoding
 X-RequestId: 1-63fd9998-5414e31d3d90538f27dae001
 X-TraceContext-TraceId: 81533eba881916b4b49713d48414c13d
    
 {
     "AppConfigCommit": "a077854c1323cb2935c7ef558d7d1ed2d27bdbc1",
     "AppEnvironment": "aws",
     "Application": "mainserver",
     "Cluster": "n/a",
     "Commit": "9efd354",
     "ConfigInstalled": true,
     "DataIntegrityErrors": 0,
     "Healthy": true,
     "InstanceId": "i-019f3908f2cdc9718",
     "Partition": "prod",
     "Vertical": "master"

Switching this up to use the list command GET https://titleId.playfabapi.com/MultiplayerServer/ListBuildAliases

Returns a 404 not found

 HTTP/1.1 404 Not Found
 Access-Control-Allow-Credentials: true
 Access-Control-Allow-Headers: Content-Type, Content-Encoding, X-Authentication, X-Authorization, X-PlayFabSDK, X-ReportErrorAsSuccess, X-SecretKey, X-EntityToken, Authorization, x-ms-app, x-ms-client-request-id, x-ms-user-id, traceparent, tracestate, Request-Id
 Access-Control-Allow-Methods: GET, POST
 Access-Control-Allow-Origin: *
 Connection: keep-alive
 Content-Length: 0
 Date: Tue, 28 Feb 2023 06:08:00 GMT
 Server: nginx
 X-RequestId: 1-63fd9a40-6e0a8fea5698911161c83ece
 X-TraceContext-TraceId: f07e0e5298edfdab00328770da0078c1

What I'm i missing here? Do I need to replace /MultiplayerServer/ with a build Id or something?

Cheers.

apis
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

·
Xiao Zha avatar image
Xiao Zha answered

Since an EntityToken is required to call the ListBuildAliases API, you need to add the X-EntityToken(Title Entity Token or Player Entity Token) instead of X-SecretKey into the command. So, the command should be like this: http POST https://TITLEID.playfabapi.com/MultiplayerServer/ListBuildAliases X-EntityToken:YourEntityToken Content-Type:application/json.

10 |1200

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

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.