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!
Answer by Sarah Zhang · Feb 11, 2021 at 09:42 AM
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?
Answer by Mikhail K · Feb 12, 2021 at 03:53 AM
@Sarah Zhang this is my setup on Photon account
looks like everything is fine, but still doesn't work automatically
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.
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!
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].
webRpcResponse.Parameters are coming up null / RoomCreated not being called 4 Answers
My PlayStream doens't work [Photon Addon] 1 Answer
Photon chat webhooks not firing 2 Answers
Photon WebHooks not triggered (redux). 7 Answers
Photon Webhooks Problem 3 Answers