question

Ilse Mul avatar image
Ilse Mul asked

PHP SDK ClientSessionToken

Quick question:

What is the ClientSessionToken supposed to do? We don't need to fill out the field, there seems to be no description anywhere on the official docs, nor on the forums from what I saw at first glance. I assume it's the session token you need to keep a player logged in at your site with their PlayFab account, but shouldn't that be returned by PlayFab? Or do I understand it wrong?

Thank you for the help! :)

Player DatasdksAccount Management
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

·
Sarah Zhang avatar image
Sarah Zhang answered

>> We don't need to fill out the field, there seems to be no description anywhere on the official docs, nor on the forums from what I saw at first glance.

Yes, generally, title developers don’t need to fill out it manually, unless using the API testing tool -- Postman. Because this field is in the request header of client APIs, and most PlayFab Platform SDK will fill it in PlayFabSettings (a field in the SDK) programmatically. If you check the API reference of a client API, for example, AddUsernamePassword, you can find the “Session Ticket” field in the request header.

>> I assume it's the session token you need to keep a player logged in at your site with their PlayFab account.

Your assumption is almost right, “client session ticket”is the client's credential to access the Client API, it needs to be contained in the request header of every client API. And as the first answer said, it would be filled in programmatically by most SDK. And every client session ticket would expired after 24 hours.

>> But shouldn't that be returned by PlayFab?

“Client session ticket”would be returned in the response of every login API calls, you can navigate to this page -- Authentication APIs to retrieve the API references. For example, it could be returned by LoginWithCustomID.

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.

Ilse Mul avatar image Ilse Mul commented ·

Sorry for the late response. Thank you for the help!

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.