I use REST API to download existing Confluence pages, then parse out @mentions. They appear like this in my page:
<ac:link><ri:user ri:userkey="abcdefghi039387472" /></ac:link>
How can I map the alpha-numeric value in the quotes to either user name or email address?
I looked all over the place for an answer but it didn't seem possible at the moment. Is it really so?
Is there a way to import our user data than we resolve the `userkey` value locally?
Thanks,
Update - got the following answer from Atlassian support:
With the approval of a site admin I can provide you with a data dump that contains all of the userskeys, Atlassian Account IDs and their emails. There is not a way where you can get all of this information on your own. As only support can translate the Atlassian Accounts into eMail addresses in a data dump.
I don't believe this is possible. As there's been updates to the API to keep confidentiality.
Here's the link about the rest API:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have filed a request with Atlassian support to get a definitive answer.
I am not following the confidentiality reasoning. The user name is visible on the page where my API user has READ permission. I don't understand why the same API user, using a Token via an API call, somehow cannot access the same information.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bing Wu I came across this message (and several other threads) as the result using this confluence api sdk via npm: https://www.npmjs.com/package/confluence-api
WORD OF WARNING: this package has not been updated in 3 years, and as a result, does not provide information that users might find relevant. For example, the issue I encountered was that the package's confluence.getContentByID function returns the content with the expander body.storage (and does not allow the user to change this) -- this returns the stored version of the page, which differs from what you would expect to see, and still returns the outdated, deprecated userkey, however using the expander body.view returns accountID, which is still usable.
If you are seeing this, please make sure you are getting the content with body.view and not body.storage. Don't waste the same time that I have on this issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.