Added a json handler to handler apikey and secret key