MongoDB denying API access, while console shell works
The cause of this problem was likely a MongoDB server configuration issue, relating to IP address binding. Changing 127.0.0.1 to 0.0.0.0 resolved the problem.