Maybe you could generate a session token that’s separate from the API key. Use that token to indicate the user’s login status. That way you wouldn’t need to delete the API key when the user logs out.
simon
6
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| User API keys specification | 70 | 35424 | September 22, 2025 | |
| Discourse Login & Registeration | 4 | 3544 | September 28, 2016 | |
| Generating and retrieving user API keys | 0 | 527 | March 2, 2023 | |
| Allow API use by regular users, not just admins | 7 | 1330 | April 29, 2023 | |
| Generating User Api Keys with REST API | 20 | 8704 | April 8, 2018 |