Added support for api keys