Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

API Access Always 403 Forbidden

Featured Replies

hi,

I need help with the API

i am on Unraid 7.1.4

So i am trying to make some proof of concept stuff with the API and tinker with curl, but this doesn't work

curl --request POST \

--header 'content-type: application/json' \

--header 'x-api-key: XXXX' \

--url 'http://192.168.0.30/graphql' \

--data '{"query":"query Info {\n info {\n time\n }\n}"}'

always leads to

{"errors":[{"message":"Forbidden resource","locations":[{"line":2,"column":3}],"path":["info"],"extensions":{"code":"FORBIDDEN","originalError":{"message":"Forbidden resource","error":"Forbidden","statusCode":403}}}],"data":null}

Triple checked everything and tried many variations.

If i damage my token value on purpose i receive a 401 instead, so token is valid.
Tokens Permissions should also be okay to read this simple field: (also tried many other fields...nothing seems to work)
In Apollo / Playground the API is accessible.

--- Edit
It works with an api token with full admin permissions Role: Admin)

A readonly token (Role: Viewer) does not work.
---


Any ideas or hints?

image.png

image.png

Edited by ingel81

22 hours ago, ingel81 said:

It works with an api token with full admin permissions Role: Admin)

A readonly token (Role: Viewer) does not work.

Same issue. Following this thread.

For the following query, only admin works.

query {
  array {
    state
  }
}

response

{
  "errors": [
    {
      "message": "Forbidden resource",
      "locations": [
        {
          "line": 3,
          "column": 3
        }
      ],
      "path": [
        "array"
      ],
      "extensions": {
        "code": "FORBIDDEN",
        "originalError": {
          "message": "Forbidden resource",
          "error": "Forbidden",
          "statusCode": 403
        }
      }
    }
  ],
  "data": null
}

Edited by eeto

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.