question

ducastefan1978 avatar image
ducastefan1978 asked

RegisterPlayFabUserRequest

hello. i am unable to create an username and password player with RegisterPlayFabUserRequest. i get ServiceUnavailable error. thank you

10 |1200

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

pfnathan avatar image
pfnathan answered

Please let us know what your TitleID is, thank you.

13 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.

ducastefan1978 avatar image ducastefan1978 commented ·

66DC. thank you

0 Likes 0 ·
pfnathan avatar image pfnathan ♦ commented ·

Can you also send us full JSON response on your call please, you can simply use Postman tool to get the JSON data, here is the instruction:

https://api.playfab.com/docs/tutorials/execute-playfab-api-via-postman

0 Likes 0 ·
ducastefan1978 avatar image ducastefan1978 commented ·

ah ok. thanks

0 Likes 0 ·
ducastefan1978 avatar image ducastefan1978 commented ·

i added https://api.playfab.com/documentation/Client/method/RegisterPlayFabUser in the postman and i got status 200 ok and sessionId: o72aqtv4tv9sg9j7j7ho2ntkk3

0 Likes 0 ·
1807605288 avatar image 1807605288 ♦ ducastefan1978 commented ·

It would be very helpful to us if you were a lot more verbose with your responses.

The answer we are looking for would look like this:

{
    "code": 200,
    "status": "OK",
    "data": {
        "PlayFabId": "D337B33B33CEB75E",
        "SessionTicket": "D337B33B33CEB75E--CB4E333031C633C7-6195-8D561F33EC5B927-Jz3iDF2+sw3p46AxzK3IRxAZcvZa0/wkzOVNEn3iTS4=",
        "Username": "theuser",
        "SettingsForUser": {
            "NeedsAttribution": false,
            "GatherDeviceInfo": false
        }
    }
}

or like this:

{
    "code": 400,
    "status": "BadRequest",
    "error": "EmailAddressNotAvailable",
    "errorCode": 1006,
    "errorMessage": "Email address not available",
    "errorDetails": {
        "Email": [
            "Email address already exists. "
        ]
    }
}

For the first error, we need which PlayFab SDK you're using, the version of the engine, the version of the SDK, and the full stacktrace and log of the error you're getting.

ServiceUnavailable is a very generic error and doesn't tell us enough details.

0 Likes 0 ·
pfnathan avatar image pfnathan ♦ commented ·

Also, in Postman, you can test this with your TitleID and virify them on your Game Manager to see if your calls are getting through correctly.

0 Likes 0 ·
Show more comments
ducastefan1978 avatar image
ducastefan1978 answered

hello. i still have an issue. i've managed to add some users for ex: user: test001 pass:12345678

from postman i have for https://66DC.playfabapi.com/Client/LoginWithPlayFab

{ "code": 200, "status": "OK", "data": { "SessionTicket": "6CE085A2491A6096-0-0-66DC-8D564E094A67F13-7GcqBsKD+uv++uGNzPutHC06kGFixW0PhMUBhgkEgdw=", "PlayFabId": "6CE085A2491A6096", "NewlyCreated": false, "SettingsForUser": { "NeedsAttribution": false, "GatherDeviceInfo": false }, "LastLoginTime": "2018-01-26T17:12:28.236Z" } }

so everything works fine. but from Unity for

LoginWithPlayFabRequestrequest = newLoginWithPlayFabRequest();
request.Username = username.text;
request.Password = password.text;
request.TitleId = PlayFabSettings.TitleId;
PlayFabClientAPI.LoginWithPlayFab(request, OnLoginResult, OnPlayFabError);

i have

Got an error: ServiceUnavailable UnityEngine.Debug:Log(Object) AuthenticationScreenModule.view.LoginSignInView:OnPlayFabError(PlayFabError) (at Assets/888Poker/Assets/Modules/AuthenticationScreenModule/view/LoginSignInView.cs:72) PlayFab.Internal.<MakeApiCall>c__AnonStorey1:<>m__1(String) (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabWWW.cs:128) PlayFab.Internal.<Post>c__Iterator0:MoveNext() (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabWWW.cs:184) UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

i'm not sure what i'm missing here. thank you

10 |1200

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

ducastefan1978 avatar image
ducastefan1978 answered

i've changed the Compress Api Data flag to false in the unity PlayFabSharedSettings and it works fine now apparently

thank you

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.