Add a stable ID to the user endpoint when asking for profile (BB-8580)

As BB API consumers, how can we implement a user migration when a user decides to change both his username and hit email address?

Could you add the stable ID of the user to the /user endpoint?

Without it, BB users are not satisfied using out platform with a BB account because, when such a change happens, they have to start from scratch (like new users). Github users benefit of a transparent migration feature because the Github API returns this stable ID in each profile.

Traditionally we have not exposed repository or user ids. However, this looks to be a valid use case. I've added this issue to our internal tracker to be prioritized. We'll let you know when we've got more to share on this.

We ran into this issue as well. If users change their Bitbucket username there is no way to properly link the user to a user in our system. I'm not sure that using username OR email is a good way to link users either.