Is it possible to approve a user but not send an email?


(Joshua Frank) #1

Specifically, I’ve got a script that creates and approves a new user, but the system sends an approval email. For various reasons, I want the activation email to come from me personally. So, is there a way to do perform the following workflow via the API:

Approve a user, WITHOUT sending the email.
Get the link that the activation email WOULD HAVE SENT so that I can send it myself.

(Sam Saffron) #2

Can’t you use the invite API for this stuff ? cc @techAPJ


(Joshua Frank) #3

@techAPJ: Just to anticipate the next question, I’m activating with /admin/users/{userId}/approve , and this sends the activation email.


(Joshua Frank) #4

I’ve been working around this for a while, but does anyone have any ideas on this? Of late I’ve been having the problem that people aren’t getting the invitation emails, or maybe they are but they don’t recognize the sender and so they delete without reading. It would be good if I could at least get the activation link that the system sends, so I can send a personal note from my own account, with that link, so that people would definitely receive it.


(Kane York) #5

You can do that now by clicking invite, entering the email, and selecting “Copy Invite Link”.


(Joshua Frank) #6

Where is that initial “invite” link? I can’t find it anywhere. Thanks.


(Kane York) #7

Just the Invite button on the bottom of the topic.

:arrow_double_down: right there!


(Joshua Frank) #8

Ohhh, I do see that. I will give it a try. Thanks.


(Jeff Atwood) #9

Yes, @techapj built this for the 1.4 release!


(Joshua Frank) #10

I checked this out but it’s not quite what I’m looking for. This UI invites someone to the site as a new account, which they can and must set up. On my site, I create users via the API because I want them to have user and display names matching my database of invitees (and not whatever they might choose, like lolcat456, or else the default somename, auto-assigned because their email address is somename@gmail.com).

My user creation code works correctly, but the weak point in my workflow is that when I run my code to create the user, the system sends them the activation email, and people aren’t getting them (or maybe they are but they don’t recognize the sender and so they delete without reading).

So, I’d like to create the user as I am doing now, but get the activation link that the system would have sent and then send it myself, embedded in the friendly welcome message that I already send. This way, there will only be one email, from someone they know, so they’re much more likely to read it and click through.