Error 403 when trying to create a user group

Mehdi June 26, 2021

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

0 votes
David Bakkers
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.
July 14, 2021

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

0 votes
Niranjan
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.
June 26, 2021

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

Mehdi June 26, 2021

i try both and it generate the same error :(

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events