# Log in a user via the API

**URL:** <https://meta.discourse.org/t/log-in-a-user-via-the-api/42862>\
**Category:** SSO\
**Created:** [20.Апрель.2016 08:02:42 UTC](https://meta.discourse.org/t/log-in-a-user-via-the-api/42862 "2016-04-20T08:02:42Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![wasimkham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wasimkham/32/121528_2.png) [@wasimkham](https://meta.discourse.org/u/wasimkham)\
**Post date:** [20.Апрель.2016 08:02:42 UTC](https://meta.discourse.org/t/log-in-a-user-via-the-api/42862/1 "2016-04-20T08:02:42Z")

</div>

I’ve got SSO set up and working with my website. I’m now wondering if it’s possible to log in a user to Discourse automatically, via the API, when someone logs into the website?

This is good so that users do not have to click Log In when they visit Discourse if they’re already logged into the website.

---

_[View the full topic](https://meta.discourse.org/t/log-in-a-user-via-the-api/42862)._
