How to render user links via Confluence's "Convert content body" REST API?

It is working for us – can you send an example of the rest request you are making? Ours is pretty simple, and is using user impersonation:

  {
      method: 'post',
      uri:
        '/contentbody/convert/view?spaceKeyContext=' +
        encodeURIComponent(spaceKey) +
        '&pageIdContext=' +
        encodeURIComponent(pageId),
      body: {
        representation: 'storage',
        value: '<ac:link><ri:user ri:userkey="a-valid-account-id" /></ac:link>'
      }
    }
<a class="confluence-userlink user-mention current-user-mention" data-username="a-valid-acount-id" data-account-id="a-valid-acount-id" href="https://example.atlassian.net/wiki/people/a-valid-acount-id?ref=confluence" target="_blank" data-linked-resource-id="98074626" data-linked-resource-version="1" data-linked-resource-type="userinfo" data-base-url="https://example.atlassian.net/wiki">John Doe</a>

Granted, there’s a bunch of other stuff that doesn’t work real well with that API, but the user links seem to be coming out ok at least.

2 Likes