Skip to content
TON Play edited this page Feb 3, 2025 · 6 revisions

Q: How do I know that my game is running inside telegram?

A: In case of iframe launch there is no way to detect it, but we pass telegram=true and playdeck=true query parameter into every game url so you can check it and find out telegram startup


Q: How to determine exact response within multiple getData() calls ?

A: Each getData() response contains key field according to requested data key


Q: How much data can I store via setData() ?

A: We have limit for data = 10Kb and key length <= 50 symbols


Q: How do I know that user in my game is properly authenticated?

A: You have the method getToken() that returning token field . It is JWT format of token and you can read more about it and validate over API or inplace with public key


Q: How do I know that the Play button has been pressed?

A: By clicking on the Play button Wrapper sends a message. You can listen to it just like the rest of the methods. The wrapper will send a payload with the following structure:

{ playdeck: { method: "play" } }

Q: How will I know that the download has been completed?

A: Upon reaching the end of the loading, the Wrapper will fire event loaded.