calls back with the accompanying $api hash