Get User Security Settings
client.user.security.get(RequestOptionsoptions?): UserSecurity { source_ip_rule, created_at, updated_at }
GET/v1/user/security
Get User Security Settings
import NirvanaLabs from '@nirvana-labs/nirvana';
const client = new NirvanaLabs({
apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});
const userSecurity = await client.user.security.get();
console.log(userSecurity.source_ip_rule);{
"source_ip_rule": {
"allowed": [
"192.168.1.0/24",
"10.0.0.0/8"
],
"blocked": [
"192.168.1.100/32"
]
},
"created_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-01-01T00:00:00Z"
}Returns Examples
{
"source_ip_rule": {
"allowed": [
"192.168.1.0/24",
"10.0.0.0/8"
],
"blocked": [
"192.168.1.100/32"
]
},
"created_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-01-01T00:00:00Z"
}