How can generate _forum_session and _t for an user through code/api call or without login to browser?

Yeah, it’s still not clear to me what exactly you’re trying to achieve.

If you need to integrate another webpage using Discourse’s auth as the source of truth, you can use Discourse as a SSO provider.

If you need to make server-to-server calls to Discourse’s API, you can create API keys on /admin/api/keys.

Can you share what is the functional need you’re trying to address?

2 Likes