question

blackghostgamesofficial avatar image
blackghostgamesofficial asked

PlayFabClientSDK.GetAccountInfo will not be executed

Hey Guys,

I have a problem and I am trying to retrieve the user data for my website in account.html which is the script https://pastebin.com/5F61VEuC and everything else outside of "PlayFabClientSDK.GetAccountInfo" works but the function is strangely not retrieved but I don't know why can someone help me?

Player Datasdks
5 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.

Infer Wang avatar image Infer Wang commented ·

Did you receive any error messages? Did you use PlayFab javascript sdk?

0 Likes 0 ·
blackghostgamesofficial avatar image blackghostgamesofficial Infer Wang commented ·

yea of course i use this, but i dont get any errors

0 Likes 0 ·
blackghostgamesofficial avatar image blackghostgamesofficial Infer Wang commented ·

i dont get any errors, and yea i use this sdk i looked in docs, in discord servers and ChatGPT but no right answer

0 Likes 0 ·
Infer Wang avatar image Infer Wang blackghostgamesofficial commented ·

Did you call any login API to get the session ticket?

0 Likes 0 ·
Show more comments

1 Answer

·
Infer Wang avatar image
Infer Wang answered

Account Management - Get Account Info - REST API (PlayFab Client) | Microsoft Learn API needs the request header” X-Authorization”, this API requires a client session ticket, available from any Client Login function. According your script, we don’t know whether you had called login API.

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.

blackghostgamesofficial avatar image blackghostgamesofficial commented ·

idk what you mean, i have a call request in the script

0 Likes 0 ·
Infer Wang avatar image Infer Wang blackghostgamesofficial commented ·

6669-image.png

I know you have call request, but this API also needs this header. We are not sure whether you had called login API to get session ticket. Also, you can check browser developer tool network and see if the API is actually called and the result is actually returned. As tested, there is no issue with your code if called login API first. 6650-image.png

0 Likes 0 ·
image.png (1.6 KiB)
image.png (58.5 KiB)

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.