avibh
1
Hi,
I’m using the auth0 1.13.3 java library.
the following code returns a userPage object with items(users), but the start, length, total(…) are null.
int pageNumber = 0;
int pageSize = 10;
UsersPage usersPage = managementAPI.users()
.list(new UserFilter().withPage(pageNumber, pageSize))
.execute();
it seems that the api works ok, but I’d like to get the total also.
Hi @avibh,
Welcome to the Auth0 Community Forum!
So you are receiving a list of users but you are getting a null value for length? Can you show me how you are calculating the length, total, etc.?
Thanks,
Dan
avibh
4
Hi @dan.woda,
thanks.
I"m not calculating those values, I expect to get them from the auth0 service.
1 Like
Okay I see what you are saying. I think I might have found the problem as well.
It looks like you need to request the totals. Try to add withTotals
to your UserFilter
param.
Here is the source code.
Let me know how that goes.
Thanks,
Dan
1 Like
avibh
6
seems to do the trick.
thanks @dan.woda
1 Like
Glad you were able to figure it out! GL
system
Closed
8
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.