Tokens

Extend Token

Extend or remove the expiration date of a token. (Only works on valid tokens.)

Request

  • token
    string
  • newExpiration
    nullable string

Response

  • token
    object
    • token.token
      string
    • token.id
      string
    • token.type
      string
    • token.meta
      any value
    • token.createdAt
      string
    • token.expireAt
      nullable string
    • token.revokedAt
      nullable string

Usage

1. Install the module

2. Use this script

const data = await ctx.modules.tokens.extend({
  // Request body
});