New users created via API are immediately sent summary

(Jesse Perry) #1

Hey -

I add all my users to Discourse using the API, I have SSO on and I have the default be that new users are signed up for a summary email every 3 days.

Not sure if any of that is relevant, but I noticed that new users on my Discourse are immediately (like within 30 minutes) sent a summary email from Discourse. Seems like a very quick greeting to the community. I would rather have this delayed until at least 3 days after they signed up.

Is this the intended behavior?

(Jeff Atwood) #2

Hmm that does not sound right, users need to be inactive for 7 days to get a summary email. Did you change any defaults here? Are you somehow creating the users via API calls with old, historic start dates?

(Jesse Perry) #3

The only difference is that I have “default email digest” setting to be every 3 days (vs the 7 day Discourse default). But still, I would think it would be 3 days AFTER they’re inactive — not right away.

Nothing special being set via API. Just name, username, email, password & active=true.

(Jesse Perry) #4

Just wanted to circle back and say this is still happening. Oddly the email includes the “since your last visit on September 15” text at the top of the email, even though the user has literally never logged in. This email gets sent out around 2 hours after the user is created.

(Jesse Perry) #5

Hey all - this is still happening. Any idea why it might be? Literally someone is added via API, then gets the digest summary email immediately afterwards.

(Jesse Perry) #8

Hey squeaky wheel here :wave: I wish I had the technical expertise to help this out. Is there anything I can do to help this issue? Or I can just lay low and wait :bow:

(Blake Erickson) #9

I have not been able to duplicate this. On a regular discourse instance (non dev environment) I created 2 users via the api and I have the default email digest set to 3 days.

(Jesse Perry) #10

Thanks for testing that. I really appreciate that!

How I’m creating the user is POST to /users?api_key=&api_username=
JSON body being:


Is there something different I’m doing there than you did in your tests?