question

joerg-miethe avatar image
joerg-miethe asked

How to handle wrong authentication header with SDK - Kit

Hello,

I'm making a little Game with PlayCanvas an want to add an leaderboard via PlayFab. I´ve imported the SDK- Kit and can login from Script to PlayFab. Next I want to change the 'Displayed name' to show in the leadeboard..

I get the following error;

"The URL for this request is not valid for this tit…ect API endpoint is https://xxxxx.playfabapi.com/",

when I call;

var updateName = { "DisplayName": name, };

PlayFabClientSDK.UpdateUserTitleDisplayName(updateName);


searching here for some help, I noticed thats there a problem with the 'authentication header', but

I´ve learned that the 'authentication header' is automaticly added by the SDK-Kit, I´m verry gratefull for every hint, where to look next :-(

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

·
Seth Du avatar image
Seth Du answered

Before the login and any other client API calls, have you set up your title?

I am not sure what language you are using, If it is Javascript:

PlayFab.settings.titleId = "your title ID"; 

If it is C#:

PlayFabSettings.TitleId = "your title ID";

In addition, if it is Unity, you are able to use PlayFab Unity Extension, where title ID can be directly configured.

1 comment
10 |1200

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

joerg-miethe avatar image joerg-miethe commented ·

Yeah...works on first try... thanks a lot

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.