Skip to content

modify-direct-access-token ​

Available in4.21.0 +

Modifies a direct access token. An option that is not specified leaves the current value of the token unchanged.

Syntax:

shell
sfiler-admin [options] modify-direct-access-token [command options]
Command optionsRequired/OptionalDescription
-iRequiredThe identifier of the direct access token, as displayed in the Identifier column of the list-direct-access-tokens command. Only a token that this command lists for the user running the command can be designated.
-eOptionalThe email address of the recipient. With the EMAIL_OTP security type, it is required only if the token has no email address yet.
-lOptionalThe language of the token, among the languages enabled on the instance (en, fr, es, de, it).
-tOptionalThe name of the theme of the token. The theme must exist and be active.
-stOptionalThe security type: NONE, PASSWORD, SMS_OTP or EMAIL_OTP (see below).
-pwOptionalThe password. Required when the security type is PASSWORD.
-pnOptionalThe phone number that receives the access code. Required when the security type is SMS_OTP (E.164 or international format, ex: +15145556666).
-pmOptionalThe name of the permission granted on the share, as displayed by the list-permissions command (ex: permission.name.2). The name is not case-sensitive.

The security types are the same as for add-direct-access-token, which describes them.

The permission of a token can be changed but not removed. The email address of a token secured by EMAIL_OTP cannot be removed, since its access code is sent to that address.

Example:

This command changes the token "AbC123", which already has an email address, so that its access code is sent to that address.

shell
sfiler-admin.sh -l my-admin -p 012345 -s https://www.example.com/sfiler/server/ modify-direct-access-token -i "AbC123" -st EMAIL_OTP
shell
sfiler-admin.exe -l my-admin -p 012345 -s https://www.example.com/sfiler/server/ modify-direct-access-token -i "AbC123" -st EMAIL_OTP