curl --request GET \
--url 'https://hpay-api.host-sl.com/api/v1/users/?is_active=true' \
--header 'api-key: YOUR_API_KEY' \
--header 'secret-key: YOUR_SECRET_KEY'
from hostpay import HostPay
client = HostPay(api_key="YOUR_API_KEY", secret_key="YOUR_SECRET_KEY")
users = client.users.list(is_active=True)
for user in users:
print(user["id"], user["name"])
import { HostPay } from "@hostpay/sdk";
const client = new HostPay({ apiKey: "YOUR_API_KEY", secretKey: "YOUR_SECRET_KEY" });
const users = await client.users.list({ isActive: true });
for (const user of users) console.log(user.id, user.name);
[
{
"id": "user_abc123",
"app_user_id": "1",
"name": "John Doe",
"email": "john@example.com",
"phone_number": "+23279123456",
"is_active": true,
"created_at": "2025-01-16T10:30:00Z"
},
{
"id": "user_xyz789",
"app_user_id": "2",
"name": "Jane Smith",
"email": "jane@example.com",
"phone_number": "+23279654321",
"is_active": true,
"created_at": "2025-01-17T11:45:00Z"
}
]
Users
List Users
Retrieve a list of users for your application
GET
/
api
/
v1
/
users
/
curl --request GET \
--url 'https://hpay-api.host-sl.com/api/v1/users/?is_active=true' \
--header 'api-key: YOUR_API_KEY' \
--header 'secret-key: YOUR_SECRET_KEY'
from hostpay import HostPay
client = HostPay(api_key="YOUR_API_KEY", secret_key="YOUR_SECRET_KEY")
users = client.users.list(is_active=True)
for user in users:
print(user["id"], user["name"])
import { HostPay } from "@hostpay/sdk";
const client = new HostPay({ apiKey: "YOUR_API_KEY", secretKey: "YOUR_SECRET_KEY" });
const users = await client.users.list({ isActive: true });
for (const user of users) console.log(user.id, user.name);
[
{
"id": "user_abc123",
"app_user_id": "1",
"name": "John Doe",
"email": "john@example.com",
"phone_number": "+23279123456",
"is_active": true,
"created_at": "2025-01-16T10:30:00Z"
},
{
"id": "user_xyz789",
"app_user_id": "2",
"name": "Jane Smith",
"email": "jane@example.com",
"phone_number": "+23279654321",
"is_active": true,
"created_at": "2025-01-17T11:45:00Z"
}
]
Endpoint
GET /api/v1/users/
Headers
string
required
Your application API key
string
required
Your application secret key
Query Parameters
boolean
Filter users by their active status. If not provided, returns all users.
Response
The response is an array of user objects.string
Unique identifier for the user
string
The user ID from your own application
string
User’s full name
string
User’s email address
string
User’s phone number
boolean
Whether the user account is active
string
ISO 8601 timestamp of creation
curl --request GET \
--url 'https://hpay-api.host-sl.com/api/v1/users/?is_active=true' \
--header 'api-key: YOUR_API_KEY' \
--header 'secret-key: YOUR_SECRET_KEY'
from hostpay import HostPay
client = HostPay(api_key="YOUR_API_KEY", secret_key="YOUR_SECRET_KEY")
users = client.users.list(is_active=True)
for user in users:
print(user["id"], user["name"])
import { HostPay } from "@hostpay/sdk";
const client = new HostPay({ apiKey: "YOUR_API_KEY", secretKey: "YOUR_SECRET_KEY" });
const users = await client.users.list({ isActive: true });
for (const user of users) console.log(user.id, user.name);
[
{
"id": "user_abc123",
"app_user_id": "1",
"name": "John Doe",
"email": "john@example.com",
"phone_number": "+23279123456",
"is_active": true,
"created_at": "2025-01-16T10:30:00Z"
},
{
"id": "user_xyz789",
"app_user_id": "2",
"name": "Jane Smith",
"email": "jane@example.com",
"phone_number": "+23279654321",
"is_active": true,
"created_at": "2025-01-17T11:45:00Z"
}
]