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.ListDeviceCredentialsRequestParameters{
Page: management.Int(
1,
),
PerPage: management.Int(
1,
),
IncludeTotals: management.Bool(
true,
),
Fields: management.String(
"fields",
),
IncludeFields: management.Bool(
true,
),
UserId: management.String(
"user_id",
),
ClientId: management.String(
"client_id",
),
Type: management.DeviceCredentialTypeEnumPublicKey.Ptr(),
}
client.DeviceCredentials.List(
context.TODO(),
request,
)
}[
{
"id": "dcr_0000000000000001",
"device_name": "iPhone Mobile Safari UI/WKWebView",
"device_id": "550e8400-e29b-41d4-a716-446655440000",
"type": "public_key",
"user_id": "usr_5457edea1b8f33391a000004",
"client_id": "AaiyAPdpYdesoKnqjj8HJqRn4T5titww"
}
]Retrieve device credential information (public_key, refresh_token, or rotating_refresh_token) associated with a specific user.
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.ListDeviceCredentialsRequestParameters{
Page: management.Int(
1,
),
PerPage: management.Int(
1,
),
IncludeTotals: management.Bool(
true,
),
Fields: management.String(
"fields",
),
IncludeFields: management.Bool(
true,
),
UserId: management.String(
"user_id",
),
ClientId: management.String(
"client_id",
),
Type: management.DeviceCredentialTypeEnumPublicKey.Ptr(),
}
client.DeviceCredentials.List(
context.TODO(),
request,
)
}[
{
"id": "dcr_0000000000000001",
"device_name": "iPhone Mobile Safari UI/WKWebView",
"device_id": "550e8400-e29b-41d4-a716-446655440000",
"type": "public_key",
"user_id": "usr_5457edea1b8f33391a000004",
"client_id": "AaiyAPdpYdesoKnqjj8HJqRn4T5titww"
}
]Documentation Index
Fetch the complete documentation index at: https://auth0-chore-sdk-version-update-20260521.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Page index of the results to return. First page is 0.
x >= 0Number of results per page. There is a maximum of 1000 results allowed from this endpoint.
1 <= x <= 100Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).
Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields.
Whether specified fields are to be included (true) or excluded (false).
user_id of the devices to retrieve.
client_id of the devices to retrieve.
Type of credentials to retrieve. Must be public_key, refresh_token or rotating_refresh_token. The property will default to refresh_token when paging is requested
public_key, refresh_token, rotating_refresh_token Device credentials successfully retrieved.
ID of this device.
User agent for this device
Unique identifier for the device. NOTE: This field is generally not populated for refresh_tokens and rotating_refresh_tokens
Type of credential. Can be public_key, refresh_token, or rotating_refresh_token.
public_key, refresh_token, rotating_refresh_token user_id this credential is associated with.
client_id of the client (application) this credential is for.
このページは役に立ちましたか?