How do I protect RSS feeds with a password/key?

[ad_1]

Hi,

Im using RSS feeds to pass on some info (from Custom Post Types) to our app, but some RSS feeds should not be public. Is there any way to protect those RSS feeds with some kind of password/key?

Like: [https://example.com/news/feed/?key=a1b2c3d4\_password])

I already took a look at [https://wordpress.org/plugins/wp-rss-aggregator/]) and [https://wordpress.org/plugins/feedzy-rss-feeds/]) but those plugins dont seem to have any “Security” features.

I did stumble upon some plugins that do this but they havent been updated for years: [https://wordpress.org/plugins/dual-rss-feed-key/]) and [https://wordpress.org/plugins/feed-key/])

[ad_2]
1 Comment
  1. There might be an easier way to do this but I would disable RSS and create a custom REST endpoint and check for the key in there. Then deliver the RSS if the key is correct.

    use something like this to generate and return a custom feed:

    You can set authentication for REST:

    Would be easier to return JSON instead of RSS IMHO but then you would have to change your app.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer