Back

How to get all users

  • 1
  • Flutter
mo7amedtech
17 Sep, 2023, 23:27

hello i need to get all users register on my app, but when use api give me 25 only and i can't load more as you see.

how i can get all users ?!!

TL;DR
To get all users, you can use pagination with the `cursor` parameter in the API request. By default, the API returns 25 users at a time. To get more users, you can increase the limit parameter in the API request. Here's an example: ``` Query.limit(25) ``` You can set the limit to a higher number to get more users. Additionally, you can use the `<https://appwrite.io/docs/pagination|pagination>` documentation for reference on how to implement pagination effectively.
mo7amedtech
18 Sep, 2023, 12:00

??

mo7amedtech
18 Sep, 2023, 12:00

@Moderator

D5
18 Sep, 2023, 12:12

Yes, by default you get 25 documents

D5
18 Sep, 2023, 12:15

You can use Query.limit(25) And set the 25 to a higher number to get more elements

darShan
18 Sep, 2023, 12:26

Use cursor, if you have a lot of documents in a loop.

D5
18 Sep, 2023, 12:45

That's it. You should not get everything at once

mo7amedtech
18 Sep, 2023, 14:43

I need to loop to all users email to send emails.

Binyamin
18 Sep, 2023, 15:03

Yes, that would be the right way.

Drake
18 Sep, 2023, 16:30
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more