Users

Authenticate User Token

Validate a user token. Throws an error if the token is invalid.

Request

  • userToken
    string
  • fetchUser
    optional boolean

Response

  • userId
    string
  • user
    optional object
    • user.id
      string
    • user.username
      string
    • user.createdAt
      date
    • user.updatedAt
      date

Usage

1. Install the module

2. Use this script

const data = await ctx.modules.users.authenticate_token({
  // Request body
});