I’ve figured it out, so I will leave the link to the other forum here so others like me can have an easier time trying to implement this. It turns out that the other topics that suggest you put your api_key and api_username in the URL were invalidated about half a year ago. The new way to make the POST request is to follow the steps in the following forum.
In my case, I logged someone out by making the following curl request:
curl -X POST "https://DICOURSE-WEBSITE/admin/users/USER-ID/log_out" -H "Content-Type: multipart/form-data;" -H "Api-Key: INSERT-API-KEY" -H "Api-Username: INSERT-API-USERNAME"