# Get groups using confluence API

**URL:** <https://community.developer.atlassian.com/t/get-groups-using-confluence-api/35047>\
**Category:** Confluence Cloud\
**Tags:** confluence-cloud\
**Created:** [January 21, 2020, 9:57am UTC](https://community.developer.atlassian.com/t/get-groups-using-confluence-api/35047 "2020-01-21T09:57:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Darshika1](https://avatars.discourse-cdn.com/v4/letter/d/5f8ce5/32.png) [@Darshika1](https://community.developer.atlassian.com/u/Darshika1)\
**Post date:** [January 21, 2020, 9:57am UTC](https://community.developer.atlassian.com/t/get-groups-using-confluence-api/35047/1 "2020-01-21T09:57:28Z")

</div>

Hi,

I am trying to create a developer app for Confluence cloud. I am getting the error ’ **Unauthorized** ’ when I try to call the get groups api. Heres the list of steps I followed -

1. Create an app on [developer.atlassian.com](http://developer.atlassian.com). Configure OAuth3.0 and configure confluence for it. Add ALL confluence scopes.

2. Get the authorization code while being logged in to an org admin account (for a new test site I created on a free plan) and the access token

3. Use the access token to get the site id

4. Call the API to get groups - [https://api.atlassian.com/ex/confluence//wiki/rest/api/group](https://community.atlassian.com/t5/Confluence-Cloud-questions/Get-list-of-all-groups-for-Confluence/qaq-p/1275948)

Is there any step I am missing here?

1. Assign some extra permissions to the app above?

2. Publish the app on Developer Service Desk?

3. Create a Connect app instead?

---

<div class="post-metadata">

**Author:** ![Mcobanov](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/mcobanov/32/38951_2.png) [@Mcobanov](https://community.developer.atlassian.com/u/Mcobanov)\
**Post date:** [January 21, 2020, 10:29am UTC](https://community.developer.atlassian.com/t/get-groups-using-confluence-api/35047/2 "2020-01-21T10:29:12Z")

</div>

Ok, first there is a double slash in your url after “confluence” here : [https://api.atlassian.com/ex/confluence//wiki/rest/api/group](https://api.atlassian.com/ex/confluence//wiki/rest/api/group)  
Remove that…  
And regarding permissions, this is defined for that route:  
 ![image](https://global.discourse-cdn.com/atlassiandeveloper/original/3X/2/9/2967d479e6bfa658280848c01f179c44aeee697b.png)  
When I usually test things like this I give all permissions to myself so that does not bother me.  
So check “confluence-user” permission.  
 ![image](https://global.discourse-cdn.com/atlassiandeveloper/original/3X/4/f/4f2adc3d79d7724e9e100b1e8c12c1c039af88a8.png)  
And if everything is ok, you should be able to get response even from browser for that route.

I get this in browser:

```auto
{
    "results": [
        {
            "type": "group",
            "name": "administrators"

        },
        {
            "type": "group",
            "name": "confluence-users"

        }
    ],
    "start": 0,
    "limit": 200,
    "size": 9,
    "_links": {
        "base": "https:// ****.atlassian.net/wiki",
        "context": "/wiki",
        "self": "https:// ****.atlassian.net/wiki/rest/api/group"
    }
}

```

Hope it helps 😉

---

<div class="post-metadata">

**Author:** ![Darshika1](https://avatars.discourse-cdn.com/v4/letter/d/5f8ce5/32.png) [@Darshika1](https://community.developer.atlassian.com/u/Darshika1)\
**Post date:** [January 21, 2020, 11:00am UTC](https://community.developer.atlassian.com/t/get-groups-using-confluence-api/35047/3 "2020-01-21T11:00:32Z")

</div>

Hi Mconabov,

Thanks for replying! The double slash was a typo 😅

For apps I can see permissions are of the form of -

_Read Confluence space summary( **read:confluence-space.summary** )_  
_Read a summary of space information without expansions._

This I see when I develop my app on [developer.atlassian.com](http://developer.atlassian.com) - Confluence configuration

Have you built a Connect app here? It seems permissions look different here.

Also, I want to make a REST call only. I am assuming you are able to get the response on browser because the user is already logged in?
