users
Get user
Returns a single user's details by ID, including name, email, and role.
AuthorizationBearer <token>
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
userIdstring
Response Body
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.users.getUser({ path: { userId: 'user_abc123', },});console.log(data);{
"user": {
"_id": "6507a1b2c3d4e5f6a7b8c9d0",
"name": "John Doe",
"email": "john@example.com",
"role": "owner",
"isRoot": true,
"profileAccess": [
"all"
]
}
}{
"error": "Unauthorized"
}Empty
{
"error": "Not found"
}