# Discourse sso login using Rest API

**URL:** https://meta.discourse.org/t/discourse-sso-login-using-rest-api/60773
**Category:** Development
**Tags:** rest-api
**Created:** [April 11, 2017, 1:02pm UTC](https://meta.discourse.org/t/discourse-sso-login-using-rest-api/60773 "2017-04-11T13:02:08Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [April 11, 2017, 1:03pm UTC](https://meta.discourse.org/t/discourse-sso-login-using-rest-api/60773/2 "2017-04-11T13:03:04Z")

</div>

For mobile apps always prefer to use the user api, see:

> [@User API keys specification](https://meta.discourse.org/t/user-api-keys-specification/48536):
>
> Discourse contains a system for generating API keys per user if a very specific protocol is followed. This feature facilitates “application” access to Discourse instances without needing to involve moderators. High level description At a high level: Client (desktop app, browser plugin, mobile app) generates a private/public key pair and return url Client redirects to a route on discourse giving discourse its public key Discourse gets approval from user to use app Discourse generat…

---

_[View the full topic](https://meta.discourse.org/t/discourse-sso-login-using-rest-api/60773)._
