Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,555,635
Community Members
 
Community Events
184
Community Groups

API for token generation for external application.

We trying to integrate Confluence with our application as part of help and support.

We want to add authorization mechanism where a user having a particular access in application will be able to view or search information related to his account only.

Kindly share an API for token generation. 

2 answers

0 votes
Daniel Ebers
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Aug 17, 2022 • edited

Hi @Sweta Pawar

which kind of deployment do you use? Is is Confluence Cloud or Confluence Server?

Maybe you are referring to Personal Access Tokens?
https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html

At least I can share, they can issued via REST API.

Other than that and assuming you are using Confluence Cloud did you probable mean something like OAuth access tokens?

https://support.atlassian.com/confluence-cloud/docs/manage-oauth-access-tokens/

By closer looking into your question it semme to me you successfully created an API token for some users but look for a way doing that programmatically (in other words authentication with a super user for Atlassian Account and creating API based an API token for users, is that correct?).

According to this documentation...:

https://developer.atlassian.com/cloud/admin/user-management/rest/api-group-users/#api-users-accountid-manage-api-tokens-get

... it seems not being possible. Getting the API tokens of the users and deleting the API tokens is possible. But the page does not describe an option to set an API token.

Regards,
Daniel

0 votes
Srinatha T
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 09, 2022

Hi @Sweta Pawar ,

Welcome to Atlassian community. 

Below URL will help you create tokens in atlassian account for confluence cloud.

The above page has info like how to create and use an API token. I hope above info helps. 

Have a good day!

Thanks,

Srinath T

Hi Srinath,

Thankyou for reverting.

Actually we are working on integrating of Confluence where all our documentation is saved with our manufacturing application as part of help and support feature. We tested some api on postman using username and password but it's not working and instead if we use token id it works.

As part of authorization features we will be restricting access of the users based on role so a user with particular role will be able to view information related to his role only. As there are many users it is not possible to give access to individual users.

So we are looking out for an API which can generate token.

Like Srinatha T likes this
Srinatha T
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 10, 2022

Hi @Sweta Pawar ,

Thanks for the detailed info. Yes, try the above it has examples which will help you understand how it works. It should help. 

Have a good day! 

Cheers

Srinath T

Like Sweta Pawar likes this

Hi Srinath, 

Followed the step given in page https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/#Use-an-API-token.

But it is not working. We need an API which can generate the token. 

Srinatha T
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 10, 2022

Hi @Sweta Pawar ,

What is happening ? I am not an expert on API and I have not used these token API's myself. I am not sure If i will be of much help here. I will give a try. 

Thanks,

Srinath T

Hi @Srinatha T  Is there any way out for this or any reference can help to resolve the issue because we are stuck here. If this works then only will be able to do the integration with confluence else will have to find a work around.

Srinatha T
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 11, 2022

@Sweta Pawar , I am still not clear as to what is happening when you tried to create token using the above method ? 

@Srinatha T Our ask is that is there any token generation API for confluence? We know how to create a token manually from confluence's website, but, how can we replicate the same in our code?

@Srinatha T  Is it possible to arrange meeting with Confluence support team. We can show what are our finding and where we have stuck.

Srinatha T
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 13, 2022

Hi @Sweta Pawar , could you please open a support ticket with all the info. The support can help you further on this. 

@Srinatha T  Please let me know how can I raise the support ticket. I am trying to raise but it is directing me to same same page. (Current page)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events