Search Users (beta)
Search users within an App.
HTTP Request
POST /v1/auth/users/search
Returns
A successful response returns a list of User
objects in users
property and also pagination related properties.
Body
-
limit number
Number of objects to return per response, must be between 10 to 100, defaults to 50.
-
starting_after string
A cursor for use in pagination. starting_after is an object ID that defines your place in the search result when there are more results to fit into a single response. For instance, if you make a search request with limit of 100 objects, ending with user_123, your subsequent call can include
starting_after: user_123
in order to fetch the next page of the search result.Minimum length is
1
. -
filters object
Filters object to apply to the search.
POST
/v1/auth/users/search
curl \
-X POST https://api.streambird.io/v1/auth/users/search \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"limit":100,"filters":{"operator":"OR","fields":[{"field":"phone_number_match","operator":"eq","value":"2222222"}]}}'
Request example
{
"limit": 100,
"filters": {
"operator": "OR",
"fields": [
{
"field": "phone_number_match",
"operator": "eq",
"value": "2222222"
}
]
}
}
Response examples (200)
{
"users": [
{
"user_id": "user_24wFP9pDa9YiMJLun94iKykoZs2",
"app_id": "app_24ydphdixx2ydhF0E5WUFUKWNqi",
"first_name": "John",
"middle_name": "",
"last_name": "Smith",
"active": true,
"updated_at": 1639873806,
"created_at": 1639873806,
"emails": [
{
"id": "email_24oXBL3PufzHkH1Jzyjc2EXYeo7",
"verified": false,
"email": "sandbox@streambird.io",
"updated_at": 1639873806,
"created_at": 1639873806
}
],
"phone_numbers": [
{
"id": "pn_24oXBLRv6BoHXbNZoTAZkAFlRsy",
"verified": true,
"phone_number": "+14152222222",
"updated_at": 1643004687,
"created_at": 1639873806
}
],
"wallets": [
{
"id": "wallet_24tdfcVDSJQpK5huDnZaqPP2aiI",
"app_id": "app_24ydphdixx2ydhF0E5WUFUKWNqi",
"user_id": "user_24wFP9pDa9YiMJLun94iKykoZs2",
"public_address": "0xd3EfC42956c546Cf27B5f18062c63B4BF6d72D7c",
"wallet_type": "ETH",
"is_default": true,
"updated_at": 1640133104,
"created_at": 1640133104
}
],
"totps": [
{
"id": "totp_284EPXPYI5zZoh4pp2mpAQ2PnuY",
"user_id": "user_24wFP9pDa9YiMJLun94iKykoZs2",
"verified": false,
"updated_at": 1650467433,
"created_at": 1650467433
}
]
}
],
"total_count": 10,
"has_more": false
}