# REST API list pipelines - how to use the next\_page\_token

**URL:** <https://discuss.circleci.com/t/rest-api-list-pipelines-how-to-use-the-next-page-token/41324>\
**Category:** Pipelines\
**Created:** [September 23, 2021, 4:18pm UTC](https://discuss.circleci.com/t/rest-api-list-pipelines-how-to-use-the-next-page-token/41324 "2021-09-23T16:18:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sanimesa](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/sanimesa/32/28199_2.png) [@sanimesa](https://discuss.circleci.com/u/sanimesa)\
**Post date:** [September 23, 2021, 4:18pm UTC](https://discuss.circleci.com/t/rest-api-list-pipelines-how-to-use-the-next-page-token/41324/1 "2021-09-23T16:18:27Z")

</div>

We are trying to retrieve the pipelines using the [CircleCI API](https://circleci.com/docs/api/v2/#operation/listPipelines) API but it does not look like the next\_page\_token is working correctly. I ran a request in curl without the next\_page\_token, then used the token returned for the subsequent request. However, it is returning the same set of objects.

How do I make the next\_page\_token correctly work?

Thanks.

---

<div class="post-metadata">

**Author:** ![yannCI](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/yannci/32/24866_2.png) [@yannCI](https://discuss.circleci.com/u/yannCI)\
**Post date:** [September 23, 2021, 7:00pm UTC](https://discuss.circleci.com/t/rest-api-list-pipelines-how-to-use-the-next-page-token/41324/2 "2021-09-23T19:00:08Z")

</div>

Hi @sanimesa. Welcome to the CircleCI Discuss community!

The value of `next_page_token` returned in the response should subsequently be passed as a query parameter named: **`page-token`**.

If you use an incorrect parameter name/key it’ll be ignored, and the request will return the same objects.

In case you’re using a tool like Postman, make sure there’s no additional characters (like a _line feed_) after the parameter’s name/key.

Let me know if this helps.

---

<div class="post-metadata">

**Author:** ![sanimesa](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/sanimesa/32/28199_2.png) [@sanimesa](https://discuss.circleci.com/u/sanimesa)\
**Post date:** [September 24, 2021, 1:24pm UTC](https://discuss.circleci.com/t/rest-api-list-pipelines-how-to-use-the-next-page-token/41324/3 "2021-09-24T13:24:01Z")

</div>

Thanks, it helped!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [October 4, 2021, 1:24pm UTC](https://discuss.circleci.com/t/rest-api-list-pipelines-how-to-use-the-next-page-token/41324/4 "2021-10-04T13:24:12Z")

</div>

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