Basic usage of Rest API

myopnehab.org has it’s own authentication you have to pass before you ever get your openHAB running on your RPi. You have to get past that authentication before the auth token ever comes into play.

Right because, as I said, that particular authorization string was generated and stored in a cookie. It is a random string that authorizes that specific client to interact with the API. curl is a different client so it needs to separately authenticate and get its own cookie. Or it needs to reauthenticate on every call which is more likely going to be the case.

Look at the date on that post. That was more than three years ago, long before OH 3 and long before OH implemented any authentication on the REST API. It is not really relevant here. That shows you how to authenticate with myopenhab.org but then you’ll be blocked in your REST API call because I don’t think you can authenticate again on openHAB itself.

curl.  -> myopenhab.org ->  openHAB

Both of those arrows above have a separate authentication required and I don’t know if there is a way to supply both authentications in one curl request.