How do I extract Glitch API responses into PHP json?

I’m developing a Whatsapp Business Provider using PHP as back-end. I have successfully connected Glitch to my Whatsapp Business account webhook and when user-initiated/business-initiated messages are sent, I get the response on the .env file on Glitch. But I’m experiencing difficulties in extracting those responses and converting them into my PHP json. Please help.