Comment générer _forum_session et _t pour un utilisateur via un appel de code/API ou sans connexion au navigateur ?

Can you back up and describe what problem having those cookies is going to solve?

What are you trying to accomplish? Are you trying to have Discourse authenticate against your app? Maybe look at DiscourseConnect - Official Single-Sign-On for Discourse (sso)?