Search users
curl --request GET \
--url https://apiweb.mile.app/api/v3/user/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v3/user/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apiweb.mile.app/api/v3/user/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apiweb.mile.app/api/v3/user/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apiweb.mile.app/api/v3/user/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apiweb.mile.app/api/v3/user/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/user/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": true,
"data": [
{
"hubs": [
{
"_id": "64d9932e2beb9037735ff022",
"name": "Jakarta Hub"
}
],
"userId": "621dd813eb3ebf16b94d6969",
"name": "Rina Putri",
"email": "[email protected]",
"phoneNumber": "+62 81234567890"
}
]
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Internal server error, please contact [email protected]."
}User
Search users
Finds members of your organization whose email, name or phone number contains the keyword. Only members who share a hub with you are returned. Each result lists the member’s hubs. Any signed-in user can call it.
GET
/
user
/
search
Search users
curl --request GET \
--url https://apiweb.mile.app/api/v3/user/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v3/user/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apiweb.mile.app/api/v3/user/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apiweb.mile.app/api/v3/user/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apiweb.mile.app/api/v3/user/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apiweb.mile.app/api/v3/user/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/user/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": true,
"data": [
{
"hubs": [
{
"_id": "64d9932e2beb9037735ff022",
"name": "Jakarta Hub"
}
],
"userId": "621dd813eb3ebf16b94d6969",
"name": "Rina Putri",
"email": "[email protected]",
"phoneNumber": "+62 81234567890"
}
]
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Internal server error, please contact [email protected]."
}Authorizations
Use a valid Bearer token to authenticate.
Query Parameters
Keyword to look for in email, name or phone number.
Example: rina
Only return members with this role.
Example: 6449f8ef2c481b07d40ecfc5
Only return members of this team.
Example: 650138dee2683e0e7c6b0ed2