add getapikey functionality