question

Mikhail K avatar image
Mikhail K asked

Photon webhooks are not triggered

I tried to set up webhooks for the photon application. So as soon as a room is created I should see the RoomCreated event in the playstream. My authentication is correct, all the setup on both sides: Playfab, CloudScript on Playfab and photon are fine, code looks good as well.
So, my problem was that i didn't get where I should call ExecuteExample() from the guide on Playfab website and how will it trigger the certain event as roomCreated or RoomClosed and so on. Finally, I got it worked by doing that capture.jpg
My questions are:
1. Should I manually write such code for each event(RoomClosed, RoomJoined... etc.) or it should be triggered automatically?
2. How the ExecuteExample() form the guide https://docs.microsoft.com/en-us/gaming/playfab/sdks/photon/quickstart#photon-room-event--cloudscript should work and where I should call it? It sets the properties, It raises the event, but nothing happening on the Playfab side. I looked through discussions here and checked different issues already.
I'm just a little bit confused about what's going on.
Thank you!

photonwebhooksPlayStream
capture.jpg (39.3 KiB)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sarah Zhang avatar image
Sarah Zhang answered

According to the Photon documentation -- https://doc.photonengine.com/en-us/realtime/current/reference/playfab, if you configure the Webhook Paths correctly, it should trigger the CloudScript function automatically.

As this thread -- https://community.playfab.com/questions/20786/photon-webhooks-not-triggered-redux.html mentioned, if you didn't configure Webhook "IsPersistent" key be "true", the trigger would fail. Could you please check it?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Mikhail K avatar image
Mikhail K answered

@Sarah Zhang this is my setup on Photon account
looks like everything is fine, but still doesn't work automatically


capture.jpg (37.2 KiB)
3 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Mikhail K avatar image Mikhail K commented ·

In section Analyse - Data Explorer I checked events for the room and it shows me some of the events there. I updated the cloudscript code with the version it worked in the data explorer, but again it has never appeared in the playstream. I checked setup many times, tried different cloudscript code and literally don't know what to do. I tried to check everything step by step in this order:
1. Are photon callbacks work? Yes, they are. I simply output them to the console.
2. Is my authentication works properly for photon + playfab? Yes, it is: It doesn't show me any errors, connects to both: photon and playfab, I can create room and so on.
3. Is my cloudscript correct? I think so because I checked many discussions here with several different code examples + example from the tutorial, so I don't think it could be a mistake there.
Now, I have no idea what is going on. I appreciate any help or ideas on how to figure it out.

0 Likes 0 ·
Mikhail K avatar image Mikhail K commented ·

Also, It doesn't show me these values:
"EntityLineage_title_player_account": , "EntityLineage_master_player_account": ,
for room events that are appeared in Analyse - Data Explorer, so I can assume that events are called, but somehow are not connected to that particular user.
Maybe the problem is somewhere here?
Like I said before: I appreciate any help or ideas on how to figure it out!

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang Mikhail K commented ·

Could you please try to refer to the following steps to refresh the [App Id] of the PlayFab Add-on page? In our testing, refreshing the [App Id] can solve some connection issues.

1.Fill the App ID using a fake Id, save it.

2.Fill the correct App Id, then save again.

After you refresh the [App Id], please check the [Authentication URL] on the Photon dashboard and check the [BaseURL] on the Webhook setup page. Besides, if you generate the new Photon Secret Key in the PlayFab Add-on page, you need also update the [BaseURL].

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.