# Management api pagination returning same results all pages

**URL:** <https://community.auth0.com/t/management-api-pagination-returning-same-results-all-pages/62282>\
**Category:** Get Help\
**Created:** [May 5, 2021, 6:22pm UTC](https://community.auth0.com/t/management-api-pagination-returning-same-results-all-pages/62282 "2021-05-05T18:22:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ggleason](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ggleason/32/14694_2.png) [@ggleason](https://community.auth0.com/u/ggleason)\
**Post date:** [May 5, 2021, 6:22pm UTC](https://community.auth0.com/t/management-api-pagination-returning-same-results-all-pages/62282/1 "2021-05-05T18:22:37Z")

</div>

Trying to confirm I am not going crazy. When I run a curl to the management api and use the page and per\_page options it always returns the same result no matter what page number I enter. Am I missing something?

curl -s -H "Authorization: Bearer “$token” [https://ourtenant.auth0.com/api/v2/clients?fields=name%2Cclient\_id&page=1&per\_page=50](https://ourtenant.auth0.com/api/v2/clients?fields=name%2Cclient_id&page=1&per_page=50)

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [May 5, 2021, 7:18pm UTC](https://community.auth0.com/t/management-api-pagination-returning-same-results-all-pages/62282/2 "2021-05-05T19:18:36Z")

</div>

Hi @ggleason,

I’m having trouble recreating this behavior. When I send the request `https://my-domain/api/v2/clients?fields=name%2Cclient_id&page=0&per_page=50` I get a different set of results then when I send `https://my-domain/api/v2/clients?fields=name%2Cclient_id&page=1&per_page=50`.

Are you seeing this occur with other endpoints as well (e.g. /users)?

---

<div class="post-metadata">

**Author:** ![ggleason](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ggleason/32/14694_2.png) [@ggleason](https://community.auth0.com/u/ggleason)\
**Post date:** [May 5, 2021, 7:46pm UTC](https://community.auth0.com/t/management-api-pagination-returning-same-results-all-pages/62282/3 "2021-05-05T19:46:33Z")

</div>

Are you using any special tool to send the request? I am just using curl and it appears to do the same thing with the connections api as well, but I noticed that it doesn’t complete the request but sits at the prompt waiting for me to kill the command.

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [May 5, 2021, 7:51pm UTC](https://community.auth0.com/t/management-api-pagination-returning-same-results-all-pages/62282/4 "2021-05-05T19:51:56Z")

</div>

I am pasting in the Management APIs API Explorer Access Token into the docs page and making the request from there:

 ![Screen Shot 2021-05-05 at 3.50.44 PM](https://global.discourse-cdn.com/auth0/original/3X/2/5/2596c9c4ff4ad23dff8f267ee4c737496149838c.png)

I’ll try using cURL to see if I get the same result

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [May 6, 2021, 12:02pm UTC](https://community.auth0.com/t/management-api-pagination-returning-same-results-all-pages/62282/5 "2021-05-06T12:02:22Z")

</div>

Using this cURL, I am seeing different clients per page:

```auto
curl --request GET \
  --url 'https://my-domain/api/v2/clients?fields=name%2Cclient_id&page=0&per_page=50' \
  --header 'authorization: Bearer mytoken’ \
  --header 'content-type: application/json'

```

---

<div class="post-metadata">

**Author:** ![ggleason](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ggleason/32/14694_2.png) [@ggleason](https://community.auth0.com/u/ggleason)\
**Post date:** [May 6, 2021, 3:29pm UTC](https://community.auth0.com/t/management-api-pagination-returning-same-results-all-pages/62282/6 "2021-05-06T15:29:21Z")

</div>

Awesome I used your example and modified my curl request and it looks like it is getting different values on different pages. I appreciate the help on this one.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [May 21, 2021, 3:30pm UTC](https://community.auth0.com/t/management-api-pagination-returning-same-results-all-pages/62282/7 "2021-05-21T15:30:09Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
