You can log users out through the Discourse API by making an authenticated POST request to /admin/users/<user_id>/log_out. You need to replace <user_id> with the user’s Discourse user ID.
Hi @simon , i will need to enable sso for this functionality. right? and if yes what are the things i will need to fill/enable for enabling sso just for logout?
You need to set both the Api-Key and Api-Username headers. If you are using the All Users API Key, the Api-Username header should probably be set to ‘system’