# How to login a user via API?

**URL:** https://meta.discourse.org/t/how-to-login-a-user-via-api/134272
**Category:** Development
**Tags:** rest-api
**Created:** [November 23, 2019, 2:43pm UTC](https://meta.discourse.org/t/how-to-login-a-user-via-api/134272 "2019-11-23T14:43:34Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![tohu](https://avatars.discourse-cdn.com/v4/letter/t/a8b319/32.png) [@tohu](https://meta.discourse.org/u/tohu)
#### Post date: [January 23, 2020, 9:09am UTC](https://meta.discourse.org/t/how-to-login-a-user-via-api/134272/3 "2020-01-23T09:09:53Z")

</div>

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/main/js/Authenticate.js>

---

_[View the full topic](https://meta.discourse.org/t/how-to-login-a-user-via-api/134272)._
