Retrieve list of users by ID #39640
Unanswered
jtrollkarl
asked this question in
Feature Requests
Replies: 1 comment
|
Nothing built in to the Auth REST API so nothing clients can do but loop. You could write your own security definer function that takes an array and selects from auth.users. Then return a table or json structure. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I was curious if it would be possible to implement such a function? I've currently written
suspend fun AdminApi.retrieveUsersByIds(uids: List<String>): List<UserInfo> = coroutineScope { uids.map { uid -> async { retrieveUserById(uid) } }.awaitAll() }but was curious if there would be a more efficient method instead of doing individual calls and waiting? I see in AdminApi there is:
I don't know if there currently exists an API function/path to achieve the behaviour i want (select multiple UserInfo objects by a list of IDs). My implementation is basically doing multiple calls to the
admin/users/uidhereendpoint - but is it possible to request and receive a list?Original feature request was posted in the kotlin wrapper library: supabase-community/supabase-kt#1075
All reactions