Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get accountId with ri:userkey given

Szymon Kołodziej February 24, 2022

Hello, while I am reading the page with Confluence library for python and get_page_by_id(), I receive some ri:userkey when someone is mentioned on the page via @User however I want to convert it into accountId so I can print someone's display name with rest api for example. I've tried 
"https://your-domain.atlassian.net/wiki/rest/api/user", adding userkey as query param however i don't receive usefull data. What's more, my:

userkey is = 8a7f808a7ae3db63017ae6d9f35e00b0

while my

accountID is = 61f3a7a557b25b0068a3d7d1

 

1 answer

1 accepted

0 votes
Answer accepted
Szymon Kołodziej February 24, 2022

FYI: When you use get_page_by_id() use expand="body.view" instead of expand="body.storage" to fix the issue.

Suggest an answer

Log in or Sign up to answer