PHP EventSubs Examples

This gets 'echo’ed to Twitch. Not to anywhere useful.

So there is no where you to to “see” it.

So if you want to “see” it then you need to write it to a file. Or process it to do whatever follow up actions.

So at line 95 before $data = json_decode($raw_data); you could do

        if ($headers['twitch-eventsub-message-type'] == 'notification') {
            mylog($raw_data);
            // lets parse the data from the notification into an object
            $data = json_decode($raw_data);
            // and check the data parse
            if (json_last_error() == JSON_ERROR_NONE) {

Which will write the inbound POST JSON body to log for you to “see” it.
Then tail the log file in your console.

1 Like