Change confluence invitation link

rahul rajeev February 19, 2024

Hi, 

How can I change the confluence invitation link regularly or weekly? 

I'm using 8.5.5 version for data center

2 answers

1 vote
Humashankar VJ
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 26, 2024

Hi @rahul rajeev 

 

Obviously the steps provided are generally applicable to Confluence Data Center as well.

As you might aware, Confluence Data Center is an enterprise-grade version of Confluence designed for high availability and to performance at scale right !!

Hope this helps and happy to assist further !!

Thank you very much and have a fantastic day!
Warm regards

rahul rajeev February 26, 2024

Thank you again for getting back. I am new to the atlassian environment. Can you please help in how to hit this endpoint /rest/invitation/1.0/invitation-link.  as you suggested using bash script. 

i am using confluence data center

1 vote
Humashankar VJ
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 19, 2024

Hi - I hope that you are Doing good !!

As this is not a available feature at this time

This can be achieved via REST API to generate a new invitation link.
The API endpoint /rest/invitation/1.0/invitation-link can be used for this use case and also may require few more workaround to get this in a perfect working state

Start the process and let us know whether you are close to the achieve this, we can keep triaging this

Set up a scheduled task or cron job to execute the script at your desired interval


Hope this helps

Thank you very much and have a fantastic day!
Warm regards

rahul rajeev February 26, 2024

Hi,

Thank you for your response. But will this work for Confluence data center?

Like Humashankar VJ likes this
rahul rajeev February 26, 2024

I am using Confluence data center to generate users invitation link using bash script

CONFLUENCE_URL="http://localhost:XXXX"
ENDPOINT= rest/invitation/1.0/invitation-link
USERNAME="admin"
API_TOKEN="XXXX"
    # Make POST request to create a new invitation link
    INVITE_RESPONSE=$(curl -s -u "${USERNAME}:${API_TOKEN}" -X POST \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \y
        -d '{"expirationDate": "2025-02-26T00:00:00.000Z"}' \
        "${CONFLUENCE_URL}/${ENDPOINT")
But getting authentication error

<!doctype html><html lang=en><head><title>HTTP Status 401 – Unauthorized</title><style type=text/css>body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 401 – Unauthorized</h1><hr class=line /><p><b>Type</b> Status Report</p><p><b>Message</b> Basic Authentication Failure - Reason : AUTHENTICATION_DENIED</p><p><b>Description</b> The request has not been applied because it lacks valid authentication credentials for the target resource.</p><hr class=line /><h3>Apache Tomcat/9.0.54</h3></body></html>

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events