Having a bit of trouble setting up OAuth

Hey I’m pretty new to all of this, also using php. I have a website with a login and I’m trying to make a connect with patreon situation. Currently I was able to make a button that sends them to patreon to give the thumbs up no issue, but once I get to step 4 in the doc to validate the receipt I’m having issues.
( https://docs.patreon.com/?php#step-4-validating-receipt-of-the-oauth-token )

I’m not sure how to correctly make the POST request. I have a feeling it’s very simple but for whatever reason I’m having a major issue with it! Copying the code to the side doesn’t work for php as expected, and doing

doesn’t seem to work either. Yet again I’m sure it’s simple but I’m just not getting it. How would I code this section in PHP?

Hi can I get the request id of the request you’re making?

Copying the whole response here should be fine.

I hope I correctly understood what request ID is. This is the one I’m trying to do.

Here’s my client ID: Hb7dQKv8ZpBXXXGQa2jILJLMwzTZG4WPbGNrXBv0gOmnqrjP53tYZzdFqbWnAPeh

Request [4]

POST www.patreon.com/api/oauth2/token

code=<single use code, as passed in to GET route [2]>
&client_id=<your client id>
&client_secret=<your client secret>

In an attempt to get the JSON response so I can see who is a patreon and who is not.