object token.update(object/array tokens)
This method allows to update existing tokens.
The Manage API tokens permission is required for the user role to manage tokens for other users.
(object/array)
Token properties to be updated.
The tokenid
property must be defined for each token, all other properties are optional. Only the passed properties will be updated, all others will remain unchanged.
The method accepts tokens with the standard token properties.
(object)
Returns an object containing the IDs of the updated tokens under the tokenids
property.
Remove expiry date from token.
{
"jsonrpc": "2.0",
"method": "token.update",
"params": {
"tokenid": "2",
"expires_at": "0"
},
"id": 1
}
Response:
CToken::update() in ui/include/classes/api/services/CToken.php.