Users

Create User Token

Create a token for a user to authenticate future requests.

Request

  • userId
    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.users.create_token({
  // Request body
});