updated to support authentication with API keys