question

ttg-brian avatar image
ttg-brian asked

Can you Generate A Permanent Session Ticket or Authorize with a Permanent Key?

Hi! I wanted to set up an Automated Monitor to periodically run one of our Cloudscript functions on a dummy user to verify the server + Cloudscript code functionality. Is there a way to either generate a permanent session key, or assign some other sort of key to a given account that can be used in lieu of X-Authorization, so that we do not have to set up some other system to periodically log in and then update the X-Authorization key on the Automated Monitor?

CloudScript
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

Currently, there is no permanent session ticket. The session ticket applies to the Client API, and it expires with 24 hours. It’s by design. If the automated monitor is an administrative application, you could consider using Server API ExecuteCloudScript to invoke the CloudScript functions. To call this Server API method, you needn’t log a player in but should use the secret key in the X-SecretKey headersfield. You can use a permanent developer secret key in the application.

If your application still needs to use Sessionticket or EntityToken to do the test, it’s necessary to implement some system to periodically log the entities in. Besides, you can try to add a feature request for the permanent Sessionticket and Entitytoken.

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.

ttg-brian avatar image ttg-brian commented ·

Oh hey, that Server API is exactly what I needed. I think the Client version of ExecuteCloudscript kept popping up in my search results. Thanks muchly!

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.