# About response from /api/v2/device-credentials when include\_totals parameter is true and type is rotating\_refresh\_token

**URL:** <https://community.auth0.com/t/about-response-from-api-v2-device-credentials-when-include-totals-parameter-is-true-and-type-is-rotating-refresh-token/87631>\
**Category:** Get Help\
**Created:** [July 26, 2022, 6:35am UTC](https://community.auth0.com/t/about-response-from-api-v2-device-credentials-when-include-totals-parameter-is-true-and-type-is-rotating-refresh-token/87631 "2022-07-26T06:35:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaito.sato](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@kaito.sato](https://community.auth0.com/u/kaito.sato)\
**Post date:** [July 26, 2022, 6:35am UTC](https://community.auth0.com/t/about-response-from-api-v2-device-credentials-when-include-totals-parameter-is-true-and-type-is-rotating-refresh-token/87631/1 "2022-07-26T06:35:16Z")

</div>

Hi,

I’m using Management API to retrieve devise credentials(/api/v2/device-credentials).

> **[Auth0 Management API v2](https://auth0.com/docs/api/management/v2#!/Device_Credentials/get_device_credentials)**

To handle paging, I use `include_totals` parameter.

Then I noticed a discrepancy in the behavior of returning an empty return value due to a difference in the type parameter of the request.

For example, the return value of an actual request is as follows.  
(Request parameters other than type were the same as these.)

```auto
page: 0
per_page: 100
include_totals: true
fields: id,client_id
user_id: {user_id}
client_id:

```

When requesting with `rotating_refresh_token` type

```auto
{
  "start": 0,
  "limit": 100,
  "device_credentials": []
}

```

When requesting with `public_key`

```auto
{
  "total": 0,
  "start": 0,
  "limit": 100,
  "device_credentials": []
}

```

In this case, `total` was returned.

Since the `total` parameter is requested, I think it would be preferable to return the `total` regardless of the contents of the returned value in the case of `rotating_refresh_token` as well.

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [July 26, 2022, 7:05pm UTC](https://community.auth0.com/t/about-response-from-api-v2-device-credentials-when-include-totals-parameter-is-true-and-type-is-rotating-refresh-token/87631/3 "2022-07-26T19:05:24Z")

</div>

Hi @kaito.sato ,

Welcome to the Auth0 Community!

I tested this endpoint and could not repeat this issue. Here is my test with type: rotating\_refresh\_token

 ![image](https://global.discourse-cdn.com/auth0/original/3X/9/f/9f608e5ce8b3b4c037d1288c73602d5c7ea7cbe2.jpeg)

Could you please DM me the name of your tenant and the user\_id? Thanks!

---

<div class="post-metadata">

**Author:** ![kaito.sato](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@kaito.sato](https://community.auth0.com/u/kaito.sato)\
**Post date:** [July 27, 2022, 1:08am UTC](https://community.auth0.com/t/about-response-from-api-v2-device-credentials-when-include-totals-parameter-is-true-and-type-is-rotating-refresh-token/87631/4 "2022-07-27T01:08:59Z")

</div>

Hi, @lihua.zhang,  
Thank you for your reply.

I DM’d about my tenant and user\_id.

The tenant I tried was Private Instance, so there may be a difference.  
I would be grateful if you could take a look. Thanks!

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [February 2, 2023, 6:53pm UTC](https://community.auth0.com/t/about-response-from-api-v2-device-credentials-when-include-totals-parameter-is-true-and-type-is-rotating-refresh-token/87631/5 "2023-02-02T18:53:13Z")

</div>


