Trying to register a user in a custom controller, getting unhelpful error

System Information
  • Strapi Version: 4.3.4
  • Operating System: Ubuntu 20.04.4 LTS
  • Database: Postgres
  • Node Version: 16.15.1
  • NPM Version: 8.11.0
  • Yarn Version:

I’m trying to register a User in a custom controller. The controller is running and its trying to work, but I’m getting error: ValidationError: Invalid registration info when I try to do this…

    const user = await strapi.service('admin::user').register({

Here is a clip of the error in console…

Am I doing this correctly and am just missing attribs? Or should I be doing this differently?

Thank you for sharing your expertise :slight_smile:

I started reading the Strapi code in node_modules folders. The register method above is expecting a registrationToken as the first param. Where/when is this generated for a brand new user registration? Is this an Api token maybe?

Searching a lot yesterday. I’m not finding a lot of detailed back-end developer documentation. A few YT videos, but most are no where near deep enough.