MagicMirror² v2.14.0 is available! For more information about this release, check out this topic.

[MMM-Remote-Control] Cannot GET /api

  • Hi there,

    actually the module is working fine. i can access remote.html and all functions are working.
    but as soon i try to access the api via command line i get “Cannot GET” error.

    curl -X GET
    <pre>Cannot GET /api/module</pre>

    any clue what is going on here?

  • Module Developer

    Are you sure your link example is complete?
    Is the following example $ curl -X GET http://magicmirrorip:8080/api/module/alert/showalert?message=Hello&timer=2000 working?
    Details see


  • Hi,
    Yes i,m sure. It is from the Documentation you,ve posted.
    But also your link Example don‘t work.

    Cannot GET /api/module/alert/showalert

    What i‘ve read till now it seems that the api folder isn‘t published.
    I‘ve did an update of MM but didn‘t helped.

    Further help is much appreciated.

  • I have exactly the same problem - all API calls result in error “Cannot GET /api/whatevermoduleitrytocall”. However, remote.html loads just fine.

  • @teemuoksanen said in [MMM-Remote-Control] Cannot GET /api:

    I have exactly the same problem - all API calls result in error “Cannot GET /api/whatevermoduleitrytocall”. However, remote.html loads just fine.

    As I have.

    Edited: It was a mistake, sorry. I have same problem.

  • Same here too. I thought that perhaps we needed to have MMM-Api module installed but when I install that my MM won’t even start due to errors.

  • @AxLed said in [MMM-Remote-Control] Cannot GET /api:


    it looks like the api was changed, but not documented…

    looking thru node_helper.js you can see all the commands


    the code lists these actions

                if (query.action === "SHUTDOWN") {
                if (query.action === "REBOOT") {
                if (query.action === "RESTART" || query.action === "STOP") {
                if (query.action === "USER_PRESENCE") {
                if (["MONITORON", "MONITOROFF", "MONITORTOGGLE", "MONITORSTATUS"].indexOf(query.action) !== -1) {
                    this.monitorControl(query.action, opts, res);
                if (query.action === "HIDE" || query.action === "SHOW" || query.action === "TOGGLE") {
                    self.sendSocketNotification(query.action, query);
                if (query.action === "BRIGHTNESS") {
                    self.sendSocketNotification(query.action, query.value);
                if (query.action === "SAVE") {
                if (query.action === "MODULE_DATA") {
                if (query.action === "INSTALL") {
                if (query.action === "REFRESH") {
                if (query.action === "HIDE_ALERT") {
                if (query.action === "SHOW_ALERT") {
                    self.sendSocketNotification(query.action, {
                if (query.action === "UPDATE") {
                if (query.action === 'NOTIFICATION') {
                        this.sendSocketNotification(query.action, { 'notification': query.notification, 'payload': payload });
                if (["MINIMIZE", "TOGGLEFULLSCREEN", "DEVTOOLS"].indexOf(query.action) !== -1) {
                        switch (query.action) {
                if (query.action === "DELAYED") {

    to send an alert thru the api


    the remote.html does NOT use the api, but uses the socketNotifications pipe under the covers.
    which is why it works, but the older /api/modulename… approach doesn’t

  • @sdetweil oh thank you so much !! I couldn’t find the way to use it 🙂

  • I think I solved the problem. At least it worked for me.
    Just delete file ./modules/package-lock.json. And restart the system.

  • @PolaricBear did u post this to the wrong topic?

Log in to reply