AutoML “401 UNAUTHORIZED” problem

After “bash install” is done, I try to
run sample code “tao_api_starter_kit/api/automl/classification.ipynb”.
I have a new problem look like this.

DevTools shows the problem is “401 UNAUTHORIZED”

How can I fix it?

Can you run below and share the result.
$ kubectl get services ingress-nginx-controller

Could you disable firewall and retry?

ufw disable

More, please make sure the ngc key is correct.

I disable firewall and generate new ngc key and follow
NVIDIA NGC” to setup, but still get the same error.

Could you run similar command as below to check if it can work?
$ curl -k

I try both https and http.

Please try the new key since your key is already updated.

I follow “NVIDIA NGC” to setup and change the “ngc_api_key” in “quickstart_api_bare_metal/tao-toolkit-api-ansible-values.yml”.
Still get the same error.

How about
$ curl -k

Could you replace “” with the ip address of your master node and retry the curl command?

Get the same error.

Please help collect some logs.
$ kubectl get pods

$ kubectl logs tao-toolkit-api-app-pod-5858d657f9-5zqzr | sed “/health/d”

Where the exact pod name can be found with “kubectl get pods”

Please run below to share the result.
$ vim

import requests

key = “yourkey” # FIXME: use your latest NGC API KEY
r = requests.get(‘’, headers={‘Accept’: ‘application/json’, ‘Authorization’: 'ApiKey ’ + key})

$ export PYTHONPATH=/usr/lib/python3/dist-packages:$PYTHONPATH
$ python

Beside, you can also use curl as below.
$ curl --header ‘Accept: application/json’ --header ‘Authorization: ApiKey yourkey’

2023-01-11 08-48-17 的螢幕擷圖

So, the key seems to be correct.
Could you run with below ?
$ vim

import requests
endpoint = “
response = requests.get(endpoint)
user_id = response.json()[“user_id”]
print("user_id: ", user_id)

$ python

That is the cell content of the notebook.
If not working, try to modify line3 as below and re-run.
response = requests.get(endpoint, verify=False)

I try both “requests.get(endpoint)” and “requests.get(endpoint, verify=False)”.
Both get <Response [401]>.

Suggest you to follow the method in 401 unauthorized: why?how to fix it? to narrow down.