api get_next method updated

requests from server are also allwoed