Passer au contenu principal
GET
/
guardian
/
enrollments
/
{id}
TypeScript
import { ManagementClient } from "auth0";

async function main() {
    const client = new ManagementClient({
        token: "<token>",
    });
    await client.guardian.enrollments.get("id");
}
main();
{
  "id": "dev_0000000000000001",
  "status": "pending",
  "name": "iPhone 7",
  "identifier": "76dc-a90c-a88c-a90c-a88c-a88c-a90c",
  "phone_number": "+1 999999999999",
  "enrolled_at": "2016-07-12T17:56:26.804Z",
  "last_auth": "2016-07-12T17:56:26.804Z"
}

Autorisations

Authorization
string
header
requis

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Paramètres de chemin

id
string
requis

ID of the enrollment to be retrieve.

Pattern: ^((totp|sms|voice|push|email|recovery-code|webauthn-roaming|webauthn-platform)\|)?dev_[A-Za-z0-9-_]+$

Réponse

Enrollment successfully retrieved.

id
string
défaut:dev_0000000000000001
requis

ID for this enrollment.

status
enum<string>
défaut:pending

Status of this enrollment. Can be pending or confirmed.

Options disponibles:
pending,
confirmed
name
string
défaut:iPhone 7

Device name (only for push notification).

Required string length: 1 - 20
Pattern: ^\+[0-9]{8, 20}
identifier
string
défaut:76dc-a90c-a88c-a90c-a88c-a88c-a90c

Device identifier. This is usually the phone identifier.

phone_number
string
défaut:+1 999999999999

Phone number.

enrolled_at
string
défaut:2016-07-12T17:56:26.804Z

Enrollment date and time.

last_auth
string
défaut:2016-07-12T17:56:26.804Z

Enrollment date and time.