How to authenticate to call API from


Want to read state from API: GET
Have tried:

Allowed basic authentication in API security.

  1. Added header: "Authorization: Basic Base64(username:password)
    Username and password are same which I use to log in to
    Status: 401 Unauthorized

  2. Added header: "Authorization: Bearer token
    token was generated from user profile
    Status: 401 Unauthorized

After log in in browser to this “Get” API request works fine in browser.

How Authentication should be done?


This item api no need to use bearer token. basic authorization is ok.
The following curl is working for me.

curl -v -s -o -X GET \
  '' \
  -H 'accept: application/json, text/plain' \
  -H "Authorization: Basic aaaaaaaaaaaaaaaaaaa==" 

If the output is 401 Unauthorized, you may check value of base64(username:password).
I have try to modify my basic value to wrong one, it will output 401.