# Group API, empty response

**URL:** https://meta.discourse.org/t/group-api-empty-response/67892
**Category:** Development
**Tags:** rest-api
**Created:** [August 11, 2017, 5:55pm UTC](https://meta.discourse.org/t/group-api-empty-response/67892 "2017-08-11T17:55:56Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Massimo\_Redaelli](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/massimo_redaelli/32/120795_2.png) [@Massimo\_Redaelli](https://meta.discourse.org/u/Massimo_Redaelli)
#### Post date: [August 11, 2017, 5:55pm UTC](https://meta.discourse.org/t/group-api-empty-response/67892/1 "2017-08-11T17:55:56Z")

</div>

I have a small program that daily does some work on the groups of my Discourse installation, and to do that it starts by fetching all the groups using the json API:

`GET https://disc.uaar.it/admin/groups.json?api_key=xxxx&api_username=xxx`

Suddenly a few days ago this call stopped working. Now I get a 200 response code (the login is OK, and there is no error in the logs), but the response is empty and its content type is text/plain.

I’m running v1.9.0.beta5 +8, but I cannot check if this happened at the same time as an upgrade, because the system admin is on vacation 😛

Any thoughs?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [August 11, 2017, 6:19pm UTC](https://meta.discourse.org/t/group-api-empty-response/67892/2 "2017-08-11T18:19:53Z")

</div>

We moved this route to `https://disc.uaar.it/groups/search.json`

---

<div class="post-metadata">

### Author: ![Massimo\_Redaelli](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/massimo_redaelli/32/120795_2.png) [@Massimo\_Redaelli](https://meta.discourse.org/u/Massimo_Redaelli)
#### Post date: [August 11, 2017, 7:30pm UTC](https://meta.discourse.org/t/group-api-empty-response/67892/3 "2017-08-11T19:30:02Z")

</div>

I see, thanks!

Is there a list of modified routes?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [August 11, 2017, 7:36pm UTC](https://meta.discourse.org/t/group-api-empty-response/67892/4 "2017-08-11T19:36:16Z")

</div>

> [@Massimo\_Redaelli](#):
>
> Is there a list of modified routes?

It’s very rare to modify routes like that, but since we had a lot of new stuff around groups, this route was needed for normal users and had to be moved from `/admin` scope.

---

<div class="post-metadata">

### Author: ![Donavan\_Martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/donavan_martin/32/198936_2.png) [@Donavan\_Martin](https://meta.discourse.org/u/Donavan_Martin)
#### Post date: [November 9, 2020, 3:21pm UTC](https://meta.discourse.org/t/group-api-empty-response/67892/5 "2020-11-09T15:21:30Z")

</div>

Looks like this route changed too… : `{{base_url}}/admin/groups`

Do the Discourse’s API is up to date?[Discourse API Docs](https://docs.discourse.org/#tag/Categories/paths/~1categories.json/post)

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [November 9, 2020, 8:08pm UTC](https://meta.discourse.org/t/group-api-empty-response/67892/6 "2020-11-09T20:08:02Z")

</div>

That is the exact same route OP is talking about.

It was moved 3 years ago indeed. What is the specific problem you have?

---

<div class="post-metadata">

### Author: ![Donavan\_Martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/donavan_martin/32/198936_2.png) [@Donavan\_Martin](https://meta.discourse.org/u/Donavan_Martin)
#### Post date: [November 9, 2020, 8:23pm UTC](https://meta.discourse.org/t/group-api-empty-response/67892/7 "2020-11-09T20:23:10Z")

</div>

The Postman file shared by Discourse have some issues in configuration Params & Headers.

I finally got it work by activate the “grant permissions” for the user in Discourse Settings interface and by adding headers like this:

 ![Capture d’écran, le 2020-11-09 à 15.19.25](https://global.discourse-cdn.com/meta/original/3X/a/b/ab14617ec6c093b45373b1f4455445c84fc08cb6.png)  
 ![Capture d’écran, le 2020-11-09 à 15.21.18](https://global.discourse-cdn.com/meta/original/3X/b/3/b321836595201bfaaf3d1fa65d5c3affcfb2e29a.png)

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [June 8, 2024, 12:36pm UTC](https://meta.discourse.org/t/group-api-empty-response/67892/8 "2024-06-08T12:36:58Z")

</div>

This topic was automatically closed after 2492 days. New replies are no longer allowed.
