user api and public js