question

dasic avatar image
dasic asked

Error while calling GetPlayersInSegmentRequest

Hi,

I am using the PlayFabAdminAPI to make a simple call to GetPlayersInSegment inside Unity but it keeps throwing this error:

InvalidOperationException: Header value contains invalid characters

while executing this line:

PlayFabAdminAPI.GetPlayersInSegment(request,success=>{},failure=>{});

Can you help me?

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

Seth Du avatar image Seth Du ♦ commented ·

May I ask what's the version of your Unity SDK? Because you are using admin API, have you set the developer Secret Key properly?

Otherwise, try to delete PlayFab SDK then re-install the lateset version and see if it helps.

0 Likes 0 ·
dasic avatar image dasic Seth Du ♦ commented ·

Thanks for the reply!


How can I check the imported version of the SDK?

About the Secret Key i can confirm that it is set properly because the client API works perfectly (and I double checked the PlayFabSharedSettings string inside my project).

0 Likes 0 ·
Andy avatar image Andy ♦♦ dasic commented ·

In the PlayFab Unity editor extension, the current SDK version is displayed on the "SDK" panel. It's also available in PlayFabSettings.SdkVersion.

Also, to clarify, the secret key isn't used for the client API calls, only server and admin, so the fact that your client calls work doesn't necessarily mean your secret key is set correctly.

The best way to debug an issue like this would be to get a Fiddler trace of the network traffic. We can then inspect that to see what might be going wrong.

0 Likes 0 ·

0 Answers

·

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.