Added APIkey checking to API helpers