Added some methods for app/plugin, Only set API_KEY if not defined before