i know that every user has long accountId that is unique, but is it safe to use user_id (for example “admin”) and host url (for example “someStuff.atlassian.net”) as user identifier? Is that user name unique inside one Jira instance?
Username and userkey are deprecated in favor of accountId. You shouldn’t depend on them because they will be completely removed very soon.
It’s definitely not safe, as user keys and usernames are being entirely removed from Jira cloud and will be gone within weeks.
Ok, i got it. Does that means that i need to use accoundID to get bearer jwt token for user? If yes, so where from should i get accountId if i can’t use user_id or user_key?
Now i get user name and host url from request params (of course after verifying qsh and jwt).
Yes, you need to use and accountId. How you get the bearer token depends on the library you are using (e.g. Atlassian Connect Express) but all these libraries now expect an accountId.
Ok, thanks for reply. I will look through that places you mentioned.
Upd: accoundId is sent in jwt token.