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

API for token generation for external application.

Sweta Pawar May 9, 2022

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
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.
August 17, 2022

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 9, 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

Sweta Pawar May 9, 2022

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
Sweta Pawar May 10, 2022

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

Sweta Pawar May 10, 2022

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 ? 

Sweta Pawar May 11, 2022

@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?

Sweta Pawar May 13, 2022

@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. 

Sweta Pawar May 13, 2022

@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