# Discourse SSO synced login with API

**URL:** https://meta.discourse.org/t/discourse-sso-synced-login-with-api/164710
**Category:** SSO
**Created:** [September 21, 2020, 10:55am UTC](https://meta.discourse.org/t/discourse-sso-synced-login-with-api/164710 "2020-09-21T10:55:25Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![saddam](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@saddam](https://meta.discourse.org/u/saddam)
#### Post date: [September 21, 2020, 10:55am UTC](https://meta.discourse.org/t/discourse-sso-synced-login-with-api/164710/1 "2020-09-21T10:55:25Z")

</div>

I’m having trouble in syncing login on discourse via api, I have go through many posts but didn’t get it.

As mentioned in the following post [https://meta.discourse.org/t/sso-synced-login-state-tips/60464](https://meta.discourse.org/t/sso-synced-login-state-tips/60464) we can append the `session/sso` with forum site url and it will logged into discourse when user click on it.

But what we need is to login user on discourse from server side so we don’t have to change any link to set user logged in.  
As a reference i can mention newrelic implementation. When user logged in to main site and refresh forum site without clicking any link, it will be set as logged in.  
[https://discuss.newrelic.com/](https://discuss.newrelic.com/)

Can you please suggest how we can achieve this?  
Thanks
