In some cases people may want to send out a batch of invites via a third party tool, mailchimp, boomerang and so on. Many of these platforms are designed for email spam and provide better feedback and statistics.
In some cases people may want complete control over, subject and body of the email. They may want to include custom copy that differs to the standard email.
To achieve this we need to amend our API endopoint to allow for generation of tokens.
The spec is quite simple:
Input is the exact same format our CSV invite takes
Output is a CSV containing emails and invite links
Let me make sure I’m interpreting this correctly. From what I reading, the API call will take a CSV file that contains a list of (email,groups,topic_id)
When the API call is made a CSV file is returned that contains a list of the same length of (email,link) that we can stick in any email body we want for sending out to people.
If this is correct, then that should work great for us.
Great! @sam and @codinghorror we really want to test this as soon as possible. Would it be possible to upgrade our discourse instance with this new feature?
You can use that if you wish, but you will need to tack “emails and username” to every invite you generate, we are building a second part to this that allows you to associate the email with the invite.
Up to you, you can use the disposable tokens if you wish .
I would love to try if possible. We are trying to test this out with an event that is coming up this fall and we want to try and send out emails as soon as possible. I’m assuming our current discourse server does not have the disposable invite feature yet since it was just pushed a few hours ago. Would it be possible to upgrade our server so we can try this?
disposable_invite_tokens.rb:12:in <main>': undefined method body’ for #<Hash:0
x2846be0> (NoMethodError)
I would normally link this to my personal ignorance about ruby, but it looks like much of the script ran and a “NoMethodError” may be signifying that no method on the server exists (wild ass guessing now.) Can you tell if I’m running the script incorrectly or if our discourse server has not been fully deployed with these changes yet?