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

Error 403 when trying to create a user group

Im using confluence cloud and i try to create new User group

i get the  Authorization token from https://id.atlassian.com/manage-profile/security/api-tokens  <email>:API_TOKEN coded base 64

and i add all scopes to atlassian-connect.js

 

const bodyData2 = {
        "name": "RS-managers"
      };
    AP.request({ url: "/rest/api/group", 
        type: 'PUT',
        contentType: "application/json",
        Accept: 'application/json',
        Authorization: "bWJvdWF6emEuc3BlY3RydW1ncm91cGVAZ21haWwuY29tOnd6UGhpRXBWd1JTN0E0aDhrRVRyODhGRg==",
        data: JSON.stringify(bodyData2),
        success: function (data) { 
            console.log(data)
        }
    }).catch(function (error) {
        console.log(error)
    });

2 answers

@mehdi - Could you try using POST method? PUT is generally used for update.

i try both and it generate the same error :(

Hello @mehdi 

You code has the same mistake in it this other question you asked. You're not providing the API version number in the request URL:

The URIs for resources have this structure:

https://<site-url>/rest/api/3/<resource-name>

For example, https://your-domain.atlassian.net/rest/api/3/issue/DEMO-1

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

🏑 Atlympic Event: Confluence

Hello Community!  Quick disclaimer: We are running a contest on Community (The Atlympics!) from July 23rd - August 8th of 2021. If you are interested in participating in this contest (prizes! ...

464 views 18 16
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