# First time login for a user using API KEY

**URL:** <https://meta.discourse.org/t/first-time-login-for-a-user-using-api-key/249660>\
**Category:** SSO\
**Tags:** openid-connect, rest-api\
**Created:** [December 22, 2022, 11:34am UTC](https://meta.discourse.org/t/first-time-login-for-a-user-using-api-key/249660 "2022-12-22T11:34:09Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![mohit\_kumar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mohit_kumar/32/284559_2.png) [@mohit\_kumar](https://meta.discourse.org/u/mohit_kumar)\
**Post date:** [December 23, 2022, 6:16am UTC](https://meta.discourse.org/t/first-time-login-for-a-user-using-api-key/249660/3 "2022-12-23T06:16:40Z")

</div>

[DiscourseConnect](https://meta.discourse.org/t/13045?silent=true) will not work in my case, because at a time either OIDC or [Discourse Connect](https://meta.discourse.org/t/13045?silent=true) can be used. I tried reverse engineering the discourse api.  
The URL is:- [https://smallidea.co/u](https://smallidea.co/u)

It has following payload:-  
{  
name: testuser  
email: [test@xxxxxx.com](mailto:test@xxxxxx.com)  
username:discoursetestuser3  
password\_confirmation:2290e67e2f59d6b9a0edbc735cef0e1d  
challenge:598d41761746371257a4c89d5ac61260  
timezone:Asia/Calcutta  
}

I am not able to understand “password\_confirmation” and “challenge” parameters. Any idea what is this ?  
Both of these parameters are dynamic and there is no fixed value that I can pass. This is random.

---

_[View the full topic](https://meta.discourse.org/t/first-time-login-for-a-user-using-api-key/249660)._
