Ok, the API path for your test system should look something like this :
https://N5GEANP7VLC7G6AH.anvilapp.net/_/private_api/MQ3NN26R46UZORDRDWFMXQQF/{name}
If you publish it publicly, it should look something like this :
https://N5GEANP7VLC7G6AH.anvilapp.net/_/api/{name}
Can you try publishing it publicly and see if the end point is reachable then? Make the endpoint simple, ie just return “hello”, just to prove a point.