MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Module for MagicMirror forum

    Scheduled Pinned Locked Moved Solved Requests
    8 Posts 3 Posters 1.1k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • karsten13K Offline
      karsten13 @bugsounet
      last edited by

      some api urls seem to work without authentication, e.g.

      ❯ curl -s https://forum.magicmirror.builders/api/recent/posts/day | jq -r '.[].topic.title'
      Default Weather Module Icon Position
      Module for MagicMirror forum
      MMM-Formula1 updates
      MMM-Formula1 updates
      MMM-Formula1 updates
      Live phone location
      Refresh Magic Mirror after custom css changes
      Module for MagicMirror forum
      Refresh Magic Mirror after custom css changes
      MMM-QuotesFromReddit
      Refresh Magic Mirror after custom css changes
      
      karsten13K 1 Reply Last reply Reply Quote 1
      • karsten13K Offline
        karsten13 @karsten13
        last edited by karsten13

        the use of a csrf token is restricted to admins (as already mentioned by @bugsounet), there is a hack described here to open this for all users but I don’t think we should do this.

        For accessing the read(-only) api you can use a cookie from your browser, e.g.

        curl --cookie "express.sid=xxxxxxx" https://forum.magicmirror.builders/api/unread
        

        but this would be challenging to use in a module for mm …

        bugsounetB 1 Reply Last reply Reply Quote 1
        • bugsounetB Offline
          bugsounet Banned @karsten13
          last edited by

          best way is using RSS

          like this

          KristjanESPERANTOK 1 Reply Last reply Reply Quote 1
          • KristjanESPERANTOK Offline
            KristjanESPERANTO Module Developer @bugsounet
            last edited by

            @bugsounet Okay, that’s nice. But is it possible to get unread messages or notifications using RSS?

            bugsounetB 1 Reply Last reply Reply Quote 0
            • bugsounetB Offline
              bugsounet Banned @KristjanESPERANTO
              last edited by

              nop it’s not possible

              read api doc

              The API key is managed from the admin panel
              It is given so that the user has access to it for external use

              5723df52-42b0-455c-9d4d-b3cd3a0b8a17-image.png

              I don’t think that Veeck and @karsten13 will send it ;)

              That why best way is using recent only by rss

              my first js approach:

              let Parser = require('rss-parser');
              let parser = new Parser();
              let rss = "https://forum.magicmirror.builders/recent.rss";
              
              (async () => {
              
                let feed = await parser.parseURL(rss);
              
                feed.items.forEach(item => {
                  console.log(item.title + ' --> ' + item.link)
                });
              
              })();
              

              Result:

              bugsounet@Kubuntu:~/test$ node test
              Module for MagicMirror forum --> https://forum.magicmirror.builders/topic/18611/module-for-magicmirror-forum
              MMM-Formula1 updates --> https://forum.magicmirror.builders/topic/18608/mmm-formula1-updates
              Default Weather Module Icon Position --> https://forum.magicmirror.builders/topic/18484/default-weather-module-icon-position
              Live phone location --> https://forum.magicmirror.builders/topic/18612/live-phone-location
              Ability to display certain modules at certain times of the year? --> https://forum.magicmirror.builders/topic/18613/ability-to-display-certain-modules-at-certain-times-of-the-year
              Yahoo Fantasy Sports? --> https://forum.magicmirror.builders/topic/18614/yahoo-fantasy-sports
              A shopping list model that is integrated with Google Assistant --> https://forum.magicmirror.builders/topic/18606/a-shopping-list-model-that-is-integrated-with-google-assistant
              MMM-DHT22 --> https://forum.magicmirror.builders/topic/17978/mmm-dht22
              Refresh Magic Mirror after custom css changes --> https://forum.magicmirror.builders/topic/18609/refresh-magic-mirror-after-custom-css-changes
              MMM-QuotesFromReddit --> https://forum.magicmirror.builders/topic/4440/mmm-quotesfromreddit
              set the calendar day to a short version --> https://forum.magicmirror.builders/topic/18610/set-the-calendar-day-to-a-short-version
              New icons not showing up - default MM-Weather modules --> https://forum.magicmirror.builders/topic/17983/new-icons-not-showing-up-default-mm-weather-modules
              [MMM-OnThisDayWikiApi] - Get Wikipedia's OnThisDay using the Wikimedia API --> https://forum.magicmirror.builders/topic/18261/mmm-onthisdaywikiapi-get-wikipedia-s-onthisday-using-the-wikimedia-api
              MMM-CalendarExt3 --> https://forum.magicmirror.builders/topic/16690/mmm-calendarext3
              August-Lock Module Stuck on Loading --> https://forum.magicmirror.builders/topic/18607/august-lock-module-stuck-on-loading
              MMM-CalendarExt3 not syncing automatically with icloud --> https://forum.magicmirror.builders/topic/18598/mmm-calendarext3-not-syncing-automatically-with-icloud
              delete account --> https://forum.magicmirror.builders/topic/18341/delete-account
              Ecobee --> https://forum.magicmirror.builders/topic/701/ecobee
              PiHole-Info Modul --> https://forum.magicmirror.builders/topic/18603/pihole-info-modul
              My custom mirror --> https://forum.magicmirror.builders/topic/18600/my-custom-mirror
              
              KristjanESPERANTOK 1 Reply Last reply Reply Quote 1
              • bugsounetB bugsounet referenced this topic on
              • KristjanESPERANTOK Offline
                KristjanESPERANTO Module Developer @bugsounet
                last edited by KristjanESPERANTO

                I’ve done it! 🥳 Checkout https://forum.magicmirror.builders/topic/19133/mmm-forum.

                For accessing the read(-only) api you can use a cookie from your browser, e.g.

                @karsten13 Thank you! That was the hint that led me to the solution 🙏

                1 Reply Last reply Reply Quote 1
                • KristjanESPERANTOK KristjanESPERANTO has marked this topic as solved on
                • 1 / 1
                • First post
                  Last post
                Enjoying MagicMirror? Please consider a donation!
                MagicMirror created by Michael Teeuw.
                Forum managed by Sam, technical setup by Karsten.
                This forum is using NodeBB as its core | Contributors
                Contact | Privacy Policy