Passer au contenu principal
POST
https://{tenantDomain}/api/v2
/
users
/
{id}
/
revoke-access
Go
package example

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

func do() () {
    client := client.NewClient(
        option.WithToken(
            "<token>",
        ),
    )
    client.Users.RevokeAccess(
        context.TODO(),
        "id",
        &management.RevokeUserAccessRequestContent{},
    )
}

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.

Corps

session_id
string<session-id>

ID of the session to revoke.

Maximum string length: 50
preserve_refresh_tokens
boolean
défaut:false

Whether to preserve the refresh tokens associated with the session.

Réponse

Session deletion request accepted.