Skip to main content
POST
https://{tenantDomain}/api/v2
/
users
/
{id}
/
revoke-access
Go
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.RevokeUserAccessRequestContent{}
    client.Users.RevokeAccess(
        context.TODO(),
        "id",
        request,
    )
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

ID of the user.

Body

session_id
string<session-id>

ID of the session to revoke.

Maximum string length: 50
preserve_refresh_tokens
boolean
default:false

Whether to preserve the refresh tokens associated with the session.

Response

Session deletion request accepted.