I am developing an application that will ask the user to type in his Stack Overflow URL, meaning the URL of his Stack Overflow profile,and then get something from the Stack Exchange API.
Is there a canonical form for URL's that represent users?
I ask because my user URL looks like so:
However, I observe that the last fragment / part of the URL, i.e. the string /water-cooler-v2, which represents my user name, is redundant.
Even if I typed just the following inside a browser, it would redirect my browser to my profile page:
Notice I removed the URL part /water-cooler-v2. Therefore, I infer that Stack Overflow (and all affiliate sites) need only the
user_id, which, in my case, is 303685.
That makes me think. Is there any other URL format that represents a user? Because if there were, I would want my application to be able to parse that to get the
user_id, which is the only thing I'd be interested in. Is there an exhaustive list of such URL formats, or are these two that I mentioned just the ones?