# Refresh User Token

This endpoint refreshes a User Token. Refreshing a User Token updates the "validity_ts" of the User Token. A “refreshed” User Token should be treated as a copy of this User Token with updated validity (i.e, the “secret_dict” is inherited from the User Token that was used to refresh it). Refreshing an existing User Token does not automatically invalidate the User Token that was used to refresh it.

Method Path Operation*
POST /token/refresh refresh_user_token

*

For a user to be able to refresh User Tokens using the User Token authorization, the "refresh" permission must be included in the "options" list of the User Token.

# Request

Parameter Type In Description
validity_ts
optional*
timestamp body Time at which the User Token expires. Measured in seconds (to three decimal places) that have elapsed since the Unix epoch(opens new window). If not provided, the User Token does not expire.

*

The "validity_ts" parameter is optional and does not need to be included in the request body when refreshing User Tokens. If it is not included in the request body, its default value (null) is used and the refreshed User Token does not expire.

# Response

Attribute Type Description
token string User Token.
validity_ts timestamp Time at which the User Token expires. Measured in seconds (to three decimal places) that have elapsed since the Unix epoch(opens new window). If the value is null, the User Token does not expire.

# Status codes

Requests to this endpoint result in generic status codes. For a comprehensive list of status codes, please consult the Status codes section.

Was this article helpful?