Discord Webhook with RSS Feed from Enjin Forums

2 replies
Posts:
31
Likes:
+4
Hey! I'm trying to set up an RSS feed on our discord that tracks when certain new threads/posts are created on a particular forum on Enjin. I'm not quite sure how to get it done, however, I do know how to do it on the end of the WebHooks (I use IFTTT Applets), but I need a URL that the RSS feed will be tracked from. Do I use the one linked to the forum directly or is there one specific I should use. To clarify, I want the webhook to recognize all New Threads and Posts that come from just that particular section of the forums. If you wish to view it for yourself, head to http://arksurvivalists.com/forum, then click on Journals. Anything and Everything that comes from that forum, including the subforums, I want in an RSS feed to be sent through webhooks.

Thanks for the Support!
Posted Nov 10, 17 · OP
Posts:
4,579
Likes:
+2,570
Master
LEVEL 5
Creating a webhook is simple but it would have to be configured on Enjin's end i.e on thread creation send message to X channel (or allow data to be sent to webhook). It would involve 1) Enjin creating the expected integration and displaying a field and 2) You creating a webhook for a specific channel and entering the url in that field.

If you want to try it out, and you have a server that supports PHP/curl, here is some simple webhook code:

$discord_notify = 'TEST MESSAGE';
function postToDiscord($message)
{
$data = array("content" => $message, "username" => "Application Notifier");
$curl = curl_init(">>DISCORD SUPPLIED WEB HOOK URL<<");
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
return curl_exec($curl);
}
postToDiscord($discord_notify);
Posted Nov 10, 17
Posts:
31
Likes:
+4
Great! So what would I have to do in order to fix everything on Enjin's side of the spectrum. That code should help me out with the webhook development, I'm just not sure on the URL, or what exactly you meant by Enjin Displaying a field. You mean have a seperate output setting of some kind using forum modules?
Posted Nov 10, 17 · OP
Social Media
Follow us on our social media!
You will receive information, news, sneak peaks, giveaways and more!
NoticeNotices