I'm trying to get a complete list of all users in our Confluence Cloud instance using the REST API, but I'm having trouble finding the correct endpoint and understanding the required permissions.
I've attempted several approaches but encountered issues:
1. User Search API - Requires Query Parameter
<span>GET /wiki/rest/api/user/search?query={term}&limit=200</span>Issue: This endpoint requires a search query and doesn't return all users without a specific search term.
2. V2 Users API - 400 Bad Request
<span>GET /wiki/api/v2/users?limit=200</span>
Issue: Returns 400 Bad Request. Not sure if this endpoint exists or if I need different permissions.
And when I try to implement the endpoint in forge for my project ,
<span>const response = await asUser().requestConfluence(</span><span> route`/wiki/rest/api/user/search?query=${query}&limit=20`</span><span>);</span>Issue: Returns 401 Unauthorized even though I have all permissions and provided all required scopes in my manifest .
I've been stuck on this for quite some time and would be incredibly grateful for any insights, documentation links, or working examples the community could share. Even pointing me in the right direction would mean a lot.