Announcement

Collapse
No announcement yet.

JSON 401

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • JSON 401

    Hi,

    When trying to use the JSON api with credentials, I get a 401 depending on which browser I use.

    E.g.:
    http://pss@<ip>:<port>/JSON?request=getlocations

    Chrome: success
    IE: FAIL (401)
    Javascript: FAIL 401

    JS Code:
    Code:
    var req = new XMLHttpRequest();
    req.open("GET", url, true);
    Any clue ?

    Best regads,
    Kriz

  • #2
    If you are trying to embed the username and password in the URL then I was under the impression that this was a bit of a security hole that was closed up and to be avoided (?)...have you tried adding a basic auth http header? Or failing that the example given in the SDK implies you can pass the username/password in the HTTP arguments.
    My Plugins:

    Pushover 3P | DoorBird 3P | Current Cost 3P | Velleman K8055 3P | LAMetric 3P | Garadget 3P | Hive 3P |
    Yeelight 3P | Nanoleaf 3P

    Comment

    Working...
    X