How to get a confluence page id (url) via the sharing link?

roman_romanenkov January 22, 2022

Hi, I am currently implementing some functionality that should get the original page id or url based on the sharing url, which we get when pressing"Share" button on a confluence page and it's different every time when you press the button.

This url looks like that https://XYZ.atlassian.net/l/c/ABCDE.

I found that we can calculate a static tiny url, but that not what I need, since the sharing url is different from the tiny url.

Thanks, I will appreciate any help.

1 answer

0 votes
Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 22, 2022

Hi @roman_romanenkov 

You will get the page id while you are on confluence page itself

Let's say you are on the specific page, the URL field would look something like this

https://your-site.atlassian.net/wiki/spaces/MTS/pages/27066369/Page+1

Here 27066369 is your Page id

Let me know if you need further assistance

Thanks,

Pramodh

roman_romanenkov January 22, 2022

Hi @Pramodh M

Thanks for the answer, but that's not what I need. I meant if there is a possibility to calculate (let's say programmatically) the page id if I only have a sharing url https://xyz.atlassian.net/l/c/ABCDE without visiting the page.

I know that it's possible for tiny links, but I didn't find any information regarding sharing links and the algorithm calculating ABCDE part of the url 

Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 22, 2022

@roman_romanenkov

May I know why you are taking hard route to get the page id in confluence when you have the better way of taking page id from API or just the URL

roman_romanenkov January 23, 2022

Actually, users can share confluence links in my app, so I have to math a shared url to the original one. The shared link is the only thing that I have in the app. In order to get further information from the API, I need to get page id first.

Sienna
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 4, 2024

Hi @roman_romanenkov 

Have you found any additional solutions regarding this?

I am also looking for an answer to the same problem.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events