Log out user API

I’ve setup Discourse and working great, except for one thing. I’m using SSO and I’m unable to log a user out using the API.

I am able to retrieve the user account using the user id, but calling the log out api returns a not_found error.

{ 
    errors: ["The requested URL or resource could not be found."],
    error_type: "not_found",
}

This is the code below, i tried using the user’s username and system still no luck.

Screen Shot 2022-07-05 at 12.22.02 PM

My api key’s scope is Granular and user level is All Users.

Changing the requested method from POST to GET returns the user’s details.

Any idea why this is happening? Maybe some config within Discourse?

I’ve been trying to find a solution for this for a while now.