Rest API 401 error

Good morning

Wanted to try out the Rest API on my HA installation…and according to the docs I’ve setup a new token and send it as Authorization header with "Bearer " prefixed:

Bildschirmfoto 2022-04-17 um 11.38.22

But I always get 401 authorization error back…also with the curl example from the docs site (with own token of course ;o)

I also have the “api:” component inside configuration.yaml file.
Running 2022.4.4.

thanks in advance
richard

Have you tried updating a “state” ?

What are you trying to request from the api ?
There are specific endpoints for specific needs.

1 Like

As you see in the screenshot I am just calling GET “/api/” which should return according to the docs:

{
  "message": "API running."
}

Oh, you seem to be self-taught.
Good luck.

any luck getting the api to work ??? all Unauthorized here…