Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to create API token for Jira organisation creation using REST API

Hello Experts,

I am new to Atlassian products (currently using Trial version) and trying to create a JIRA organization using REST API (in Python) as defined in the below document in step 2).

1) As the first step, I had used this https://support.siteimprove.com/hc/en-gb/articles/360004317332-How-to-create-an-API-token-from-your-Atlassian-account to create api token and used it for doing  step 2) 

2)Trying to create JIRA organization using :

https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-organization/#api-rest-servicedeskapi-organization-post

while testing this, I am getting:
Response [403] = Returned if the user does not have permission to complete this request  i.e as per my understanding; the API token created in step 1) do not have right permission


Can someone advice me if there is any other kind of API token that needs to be created for this ? and if so, can someone navigate me to the right documentation of that API token creation process

5 answers

1 accepted

0 votes
Answer accepted
Daniel Ebers Community Leader Jun 06, 2021

Hi @Ninad Desai

using the documentation it should work:
https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/

Have you double checked if you can execute a very simple request (for example listing projects or so) to verify if REST API access works okay?
https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/

I am just saying this because it would be interesting to know if the endpoint you want to use is not working like you want it to or if it is a general issue (for example authentication and such).

You could use this example (or any other you can find on that page) for a short cross check:
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-projects/#api-rest-api-3-project-projectidorkey-get

The mentioned one just displays information about a project and exists - for a test it should be enough.

Regards,
Daniel

Hi @Daniel Ebers ,

 

Thanks for the response. Was able to fix the issue (unfortunately root cause is, I had missed selecting JIRA service management product for my account, even before using my rest API call)

This can be marked as resolved now

Regards,
Ninad

(If in case of any other way apart from one I mentioned above if anyone aware of)

Anyone who could help me out for understanding how to create API token which will have permission to create a JIRA organization as well?

Yes it's right.
You will have to validate the endpoints :/

Could you kindly elaborate with any possible example please about what exactly you mean by validate endpoints as I am not getting the same 

It should work.
Confirm that you have access to site-admins or just Jira Administrators.

Hi @Ariel Kauan ,

 

Thanks for coming back. I confirm that the atlassian account with which I created this token has "SITE ADMIN" role. Hope that's the right access needed here right to create account? 

 

Regards,
Ninad

Hi I have the same problem and it sends me to the same side that I sent you to however I even had some issues even entering this comment hair I wanted to say if it helps me that if you go on top and click on format and go down to code block you're able to even be able to answer your comment like I am now doing so by doing that because other than that it won't even let me right right here

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
Community showcase
Published in Jira Service Management

Next level incident management in Jira Service Management

Hello Atlassian Community! We’re thrilled to announce some exciting changes to incident management in Jira Service Management Cloud, in order to give your teams extra muscle during incidents, and ...

1,674 views 21 12
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you