C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
public partial class Examples
{
public async Task Example() {
var client = new ManagementClient(
token: "<token>"
);
await client.UserBlocks.ListByIdentifierAsync(
new ListUserBlocksByIdentifierRequestParameters {
Identifier = "identifier",
ConsiderBruteForceEnablement = true
}
);
}
}
package example
import (
context "context"
management "github.com/auth0/go-auth0/management/management"
client "github.com/auth0/go-auth0/management/management/client"
option "github.com/auth0/go-auth0/management/management/option"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &management.ListUserBlocksByIdentifierRequestParameters{
Identifier: "identifier",
ConsiderBruteForceEnablement: management.Bool(
true,
),
}
client.UserBlocks.ListByIdentifier(
context.TODO(),
request,
)
}
package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.resources.userblocks.requests.ListUserBlocksByIdentifierRequestParameters;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.token("<token>")
.build();
client.userBlocks().listByIdentifier(
ListUserBlocksByIdentifierRequestParameters
.builder()
.identifier("identifier")
.considerBruteForceEnablement(true)
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Management;
use Auth0\SDK\API\Management\UserBlocks\Requests\ListUserBlocksByIdentifierRequestParameters;
$client = new Management(
token: '<token>',
);
$client->userBlocks->listByIdentifier(
new ListUserBlocksByIdentifierRequestParameters([
'identifier' => 'identifier',
'considerBruteForceEnablement' => true,
]),
);
from auth0.management import ManagementClient
client = ManagementClient(
token="<token>",
)
client.user_blocks.list_by_identifier(
identifier="identifier",
consider_brute_force_enablement=True,
)
require "auth0"
client = Auth0::Management.new(token: "<token>")
client.user_blocks.list_by_identifier(
identifier: "identifier",
consider_brute_force_enablement: true
)
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.userBlocks.listByIdentifier({
identifier: "identifier",
considerBruteForceEnablement: true,
});
}
main();
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.userBlocks.listByIdentifier({
identifier: "identifier",
considerBruteForceEnablement: true,
});
}
main();
curl --request GET \
--url https://{tenantDomain}/api/v2/user-blocks \
--header 'Authorization: Bearer <token>'{
"blocked_for": [
{
"identifier": "john.doe@gmail.com",
"ip": "10.0.0.1",
"connection": "<string>"
}
]
}Get blocks by identifier
Retrieve details of all Brute-force Protection blocks for a user with the given identifier (username, phone number, or email).
GET
https://{tenantDomain}/api/v2
/
user-blocks
C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
public partial class Examples
{
public async Task Example() {
var client = new ManagementClient(
token: "<token>"
);
await client.UserBlocks.ListByIdentifierAsync(
new ListUserBlocksByIdentifierRequestParameters {
Identifier = "identifier",
ConsiderBruteForceEnablement = true
}
);
}
}
package example
import (
context "context"
management "github.com/auth0/go-auth0/management/management"
client "github.com/auth0/go-auth0/management/management/client"
option "github.com/auth0/go-auth0/management/management/option"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &management.ListUserBlocksByIdentifierRequestParameters{
Identifier: "identifier",
ConsiderBruteForceEnablement: management.Bool(
true,
),
}
client.UserBlocks.ListByIdentifier(
context.TODO(),
request,
)
}
package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.resources.userblocks.requests.ListUserBlocksByIdentifierRequestParameters;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.token("<token>")
.build();
client.userBlocks().listByIdentifier(
ListUserBlocksByIdentifierRequestParameters
.builder()
.identifier("identifier")
.considerBruteForceEnablement(true)
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Management;
use Auth0\SDK\API\Management\UserBlocks\Requests\ListUserBlocksByIdentifierRequestParameters;
$client = new Management(
token: '<token>',
);
$client->userBlocks->listByIdentifier(
new ListUserBlocksByIdentifierRequestParameters([
'identifier' => 'identifier',
'considerBruteForceEnablement' => true,
]),
);
from auth0.management import ManagementClient
client = ManagementClient(
token="<token>",
)
client.user_blocks.list_by_identifier(
identifier="identifier",
consider_brute_force_enablement=True,
)
require "auth0"
client = Auth0::Management.new(token: "<token>")
client.user_blocks.list_by_identifier(
identifier: "identifier",
consider_brute_force_enablement: true
)
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.userBlocks.listByIdentifier({
identifier: "identifier",
considerBruteForceEnablement: true,
});
}
main();
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.userBlocks.listByIdentifier({
identifier: "identifier",
considerBruteForceEnablement: true,
});
}
main();
curl --request GET \
--url https://{tenantDomain}/api/v2/user-blocks \
--header 'Authorization: Bearer <token>'{
"blocked_for": [
{
"identifier": "john.doe@gmail.com",
"ip": "10.0.0.1",
"connection": "<string>"
}
]
}Authorizations
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Should be any of a username, phone number, or email.
If true and Brute Force Protection is enabled and configured to block logins, will return a list of blocked IP addresses.
If true and Brute Force Protection is disabled, will return an empty list.
Response
User successfully retrieved.
Array of identifier + IP address pairs. IP address is optional, and may be omitted in certain circumstances (such as Account Lockout mode).
Show child attributes
Show child attributes
Was this page helpful?
⌘I