Hey hey. Whats the easiest way or is there a way t...
# support-questions-legacy
p
Hey hey. Whats the easiest way or is there a way to get a list of users given a list of userIds? For example given a list of id "1" and id "2" I want to make a call to get the first and last name for those two users. Not sure if im seeing a way to do this in the https://app.swaggerhub.com/apis/supertokens/CDI/4.0.2#/Core/getUsers ?
r
hey @puff6248 we have an API to get the user object based on the ID, but not a list of ids.
Also, first and last name is stored in user metadata which also can be fetched using id
p
Gotchya. Yeah we have a few places where we want to see a list of users and all we have is their id. Just thinking of a good way to show their first/last without making a ton of calls.
r
cache it in your db
p
Yeah I think thats what we'll have to do.
Thanks for checking!
Actually is there some sort of event or webhook we could latch onto that fires whenever a user is created in Supertokens core? And then that way we can easily cache it somewhere.
r
there is one when the user calls the sign up API
you can override the sign up api for your recipe on the backend sdk layer and hook into that
11 Views