add get app key function