Passer au contenu principal
GET
https://{tenantDomain}/api/v2
/
users
/
{id}
/
enrollments
Go
package example

import (
    client "github.com/auth0/go-auth0/management/client"
    option "github.com/auth0/go-auth0/management/option"
    context "context"
)

func do() () {
    client := client.NewClient(
        option.WithToken(
            "<token>",
        ),
    )
    client.Users.Enrollments.Get(
        context.TODO(),
        "id",
    )
}
[
  {
    "id": "<string>",
    "status": "pending",
    "type": "<string>",
    "name": "<string>",
    "identifier": "<string>",
    "phone_number": "<string>",
    "auth_method": "authenticator",
    "enrolled_at": "2023-11-07T05:31:56Z",
    "last_auth": "2023-11-07T05:31:56Z"
  }
]

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 user to list enrollments for.

Réponse

Enrollments successfully retrieved.

id
string

ID of this enrollment.

status
enum<string>

Status of this enrollment. Can be pending or confirmed.

Options disponibles:
pending,
confirmed
type
string

Type of enrollment.

name
string

Name of enrollment (usually phone number).

Maximum string length: 20
identifier
string

Device identifier (usually phone identifier) of this enrollment.

phone_number
string

Phone number for this enrollment.

auth_method
enum<string>

Authentication method for this enrollment. Can be authenticator, guardian, sms, webauthn-roaming, or webauthn-platform.

Options disponibles:
authenticator,
guardian,
sms,
webauthn-platform,
webauthn-roaming
enrolled_at
string<date-time>

Start date and time of this enrollment.

last_auth
string<date-time>

Last authentication date and time of this enrollment.