Como gerar _forum_session e _t para um usuário através de código/chamada de API ou sem login no navegador?

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)?