added access code api implementation