# How do I transfer player id to the server?

**URL:** <https://community.thunkable.com/t/how-do-i-transfer-player-id-to-the-server/1381281>\
**Category:** Questions about Thunkable X\
**Created:** [July 6, 2021, 8:07am UTC](https://community.thunkable.com/t/how-do-i-transfer-player-id-to-the-server/1381281 "2021-07-06T08:07:04Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![microinvest.devt0g3d](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@microinvest.devt0g3d](https://community.thunkable.com/u/microinvest.devt0g3d)\
**Post date:** [July 6, 2021, 8:07am UTC](https://community.thunkable.com/t/how-do-i-transfer-player-id-to-the-server/1381281/1 "2021-07-06T08:07:04Z")

</div>

I wrote a code of this type and I want this code to transfer the player id to the server when opening the page

 ![imgonline-com-ua-Resize-hUU6MiNZYsNjiN (1)](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/4/d4bbd46d51f0fb02e3efdc4fd43be38961dba29b.jpeg)

---

<div class="post-metadata">

**Author:** ![catsarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/catsarisky/32/100661_2.png) [@catsarisky](https://community.thunkable.com/u/catsarisky)\
**Post date:** [July 6, 2021, 9:16am UTC](https://community.thunkable.com/t/how-do-i-transfer-player-id-to-the-server/1381281/2 "2021-07-06T09:16:48Z")

</div>

Ok, so did you have a question?

---

<div class="post-metadata">

**Author:** ![microinvest.devt0g3d](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@microinvest.devt0g3d](https://community.thunkable.com/u/microinvest.devt0g3d)\
**Post date:** [July 6, 2021, 9:54am UTC](https://community.thunkable.com/t/how-do-i-transfer-player-id-to-the-server/1381281/3 "2021-07-06T09:54:16Z")

</div>

Yes, how do you do that?

---

<div class="post-metadata">

**Author:** ![catsarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/catsarisky/32/100661_2.png) [@catsarisky](https://community.thunkable.com/u/catsarisky)\
**Post date:** [July 6, 2021, 12:41pm UTC](https://community.thunkable.com/t/how-do-i-transfer-player-id-to-the-server/1381281/4 "2021-07-06T12:41:15Z")

</div>

Do you have a server at the blacked out url receiving the player ID?

---

<div class="post-metadata">

**Author:** ![microinvest.devt0g3d](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@microinvest.devt0g3d](https://community.thunkable.com/u/microinvest.devt0g3d)\
**Post date:** [July 6, 2021, 12:43pm UTC](https://community.thunkable.com/t/how-do-i-transfer-player-id-to-the-server/1381281/5 "2021-07-06T12:43:04Z")

</div>

yes

---

<div class="post-metadata">

**Author:** ![catsarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/catsarisky/32/100661_2.png) [@catsarisky](https://community.thunkable.com/u/catsarisky)\
**Post date:** [July 6, 2021, 3:08pm UTC](https://community.thunkable.com/t/how-do-i-transfer-player-id-to-the-server/1381281/6 "2021-07-06T15:08:54Z")

</div>

The blocks you have look OK (assuming push notifications are all set up somewhere else) - you probably just need to call the webviewer reload after you change its URL. You said in your original post that you wanted all of this to happen when the screen loads, but you have it set up for a button click - you’ll want to find the “when screen1 loads” light orange event to replace the one you’re currently using.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [July 6, 2021, 4:37pm UTC](https://community.thunkable.com/t/how-do-i-transfer-player-id-to-the-server/1381281/7 "2021-07-06T16:37:36Z")

</div>

When screen1 `Starts` or `Opens` events. I wish Thunkable has a `Loads` event.

---

<div class="post-metadata">

**Author:** ![catsarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/catsarisky/32/100661_2.png) [@catsarisky](https://community.thunkable.com/u/catsarisky)\
**Post date:** [July 6, 2021, 4:50pm UTC](https://community.thunkable.com/t/how-do-i-transfer-player-id-to-the-server/1381281/8 "2021-07-06T16:50:12Z")

</div>

> [@muneer](#):
>
> `Starts` or `Opens` events.

Thanks @muneer for that correction!

---

<div class="post-metadata">

**Author:** ![microinvest.devt0g3d](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@microinvest.devt0g3d](https://community.thunkable.com/u/microinvest.devt0g3d)\
**Post date:** [July 7, 2021, 1:59pm UTC](https://community.thunkable.com/t/how-do-i-transfer-player-id-to-the-server/1381281/9 "2021-07-07T13:59:37Z")

</div>

And if there is such a task that performed some action after the user is authorized on the site (via the Web Viewer component), this action is possible as something to track and do to it action in blocks ?

---

<div class="post-metadata">

**Author:** ![catsarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/catsarisky/32/100661_2.png) [@catsarisky](https://community.thunkable.com/u/catsarisky)\
**Post date:** [July 7, 2021, 2:19pm UTC](https://community.thunkable.com/t/how-do-i-transfer-player-id-to-the-server/1381281/10 "2021-07-07T14:19:35Z")

</div>

Yes - take a look at the post/receive functionality. See this thread for details, including a link to the javascript you’ll need on the server side:

> [@\[Solved\] Question about web viewer receives message](https://community.thunkable.com/t/solved-question-about-web-viewer-receives-message/569039/2):
>
> You webpage needs include: \<script src="https://thunkable.github.io/webviewer-extension/thunkableWebviewerExtension.js" type="text/javascript"\>\</script\> ThunkableWebviewerExtension.postMessage('hello world'); You can find instructions and details here:

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:19pm UTC](https://community.thunkable.com/t/how-do-i-transfer-player-id-to-the-server/1381281/11 "2024-11-08T13:19:57Z")

</div>


