I’ve been sending invites using the api (Discourse API Docs). When I send it on postman, I am getting the invite email. But when I implement it on laravel I’m not getting the email.
Here is the response when the api from laravel. I noticed that the emailed field is false.
yes this was a different error which was already resolved. the issue now is we’re not getting emails but using the api is successful.
i’m not sure if we need to enable anything? coz when i call the api on postman i get the email but on the laravel app we’ve created we’re not getting the emails.
It’s an old topic already, but I’m experiencing similar issue. API request to invite.json generates invite links, but does not send the email. Whereas if the same user to which the API key is bound to invites the users from UI, the email is sent normally.
Thanks for you reply. Is it really that simple, that’d be great news!
For this one, I’m using Zapier, but with an object I created by following this API doc. Maybe that’s not the correct doc or I’m missing something else.
I have tried many different parameters there, but the latest is:
{
"email": "email@email.com",
"skip_email": false,
"custom_message": "Welcome to the forum",
}
I also just tried with the following. Unfortunately that did not cause invitation to be sent:
{
"email": "email@email.com",
"skip_email": false,
"send_email": true,
"custom_message": "Welcome to the forum",
}
But maybe the properties I have there are still somehow wrong.
Good stuff, thanks for pointing that out to me. That’s an instinct that comes with longer Discourse experience, I guess. Anyway, now that you said it, makes total sense.
Let me try and I’ll get back to here on how it went!
Unfortunately still the same issue, status OK 200, but only the invite link generated.
The API from UI just had additional the explicit expires_at and max_redemptions_allowed properties set.
BTW, I’m using the system user via the integration, could that be a problem? That said, I think I also used an actual “human” user too, to test it with.
Yeah, that’s the mystery, via UI it all works without issues.
Although, I noticed is that even if I send the invite from system user’s profile / invites section, it still shows in the invitation email that I’m (my user) the one who send the invite.