Trouble setting up the api

Hello people! I’m new to the forum, just installes Home Assistant on my RPI and enjoying it so far.

Unfortunately, I am not able to get the api to work. My configuration file contains:

  auth_providers:
   - type: legacy_api_password
http:
  api_password: 123456

Calling the api through my browser gets me a 401. What could I be doing wrong?

Your browser needs to include the X-HA-Access: header to access the api. See https://developers.home-assistant.io/docs/en/external_api_rest.html. If it can’t do that, then you need to access it through another method.