בדיקת שם משתמש ייחודי באמצעות API?

Exactly! The most important thing is keeping your external ID unique for the user. pass in a “sensible” username and let Discourse do the work.