read appkey at runtime

add functionality to read appkey at runtime