When running an applitools test you might encounter a 401 Unauthorized exception, that usually means one of the following:
1) Wrong API key is specified - To find your API key see this article.
2) Not setting the server URL for private clouds/on-premise deployments - if your account is set up on a private cloud/on-premise server, see this article to configure your tests to run on the specific cloud/server.