Added support for two methods of authentication: Basic and API key as a parameter.