question

Aybjax avatar image
Aybjax asked

Validating entity token

Good day!

My webserver needs to have some kind of authentication. We decided that unity sends me the EntityToken as a way of authentication.

On postman, when I try to authenticate token via https://{ {TitleId}}.playfabapi.com/Authentication/ValidateEntityToken I get following message:

Only entities of the following types may call this API: title, cloud_root

I tried using title X-Entity-token header, but it also did not work.

How do I validate token?

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

This error means the API ValidateEntityToken should be called by the Title Entity, but you didn’t provide the correct Title Entity Token for it. To get the Title Entity Token, you need to set up the Developer Secret Key in you sever project, then call the API GetEntityToken. After the API GetEntityToken is called successfully, the Title Entity Token will be stored in the cache, so that you can call theAPI ValidateEntityToken using the title’s level authentication. Could you please check that have you followed the correct steps?

If you are not sure which part of your code caused the error, you can provide the main code snippet of entity token validation for our investigation. Please pay attention to hiding the privacy information such as the Secret Keys, Passwords, etc. in your post.

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.