add getchallenge api endpoint