How to login a user via API?

I have gone thought all the topic, None of them explain well, how to log in a user via API. I’m making an APP base on discourse APIs… someone cares to share a link or code?? please…

2 Likes

Hi did you manager to solve the problem? I am looking the same thing. My thing is simple: I just want to validate user by asking username and password, and once logged in successfully. I then save the status in my android app. I don’t want to use SSO because I just want to validate user that’s all.

There’s a React Native app that you can use as a reference to find out how to login.
This file in particular should help you get started.

https://github.com/pmusaraj/discourse-mobile-single-site-app/blob/master/js/Authenticate.js

2 Likes