# Generating a login email via API

**URL:** https://meta.discourse.org/t/generating-a-login-email-via-api/235737
**Category:** Development
**Tags:** rest-api
**Created:** [August 10, 2022, 2:55pm UTC](https://meta.discourse.org/t/generating-a-login-email-via-api/235737 "2022-08-10T14:55:20Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [August 10, 2022, 4:10pm UTC](https://meta.discourse.org/t/generating-a-login-email-via-api/235737/2 "2022-08-10T16:10:02Z")

</div>

> [@davidevans](#):
>
> What I’m looking to achieve is a sign-up process with as few steps as possible; as users sign up through another system I create the users in Discourse,

In this case the proper solution would be a invisible login setup using [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true).

> [@davidevans](#):
>
> I’ve used the ‘API reverse engineer’ technique to try and get at it, but authenticating with a global API key simply returns the homepage and triggers nothing (and without the api key it looks like it requires session cookies to be set etc.).

Have you tried:

```plaintext
curl -X POST https://meta.discourse.org/u/email-login \
-H "Api-Key: longapikeyhere" \
-H "Api-Username: system" \
--data-raw 'login=email%40gmail.com'

```

?

---

_[View the full topic](https://meta.discourse.org/t/generating-a-login-email-via-api/235737)._
