Obtaining a confirmation code via request?


Ok, so I am able to create users with a specific role id I have designated.
The challenge now lies in trying to provide them with a confirmation code.

This is what I am currently doing:
I am creating a User with a specific role (since I have multiple roles); I needed to have more control of doing this. So I post to the API’s /rest/system/user and create the user/s in a suspended state. I then post to my email svc a request to send the notification out to those user/s. The only thing left to do is for those users to verify a confirmation code and enter in a password for themselves.

How can I obtain a confirmation code to provide for my users? Is that even possible?
I’ve looked at examples, etc… and this was the closest to letting me know what to do, but doesn’t explain how to create a confirm code to send to the user via email notification.
Only way I can do it is in the admin section of my DSP via the user’s panel (logged in with sys admin rights). But I do not want to do this manually for each user created.


btw: I have a 1.8.2 version of DSP installed.


I was able to solve this. Turns out that I didn’t need to manually invoke a send_invite to the created user. I did this as a separate second POST to the API. Instead, I just had to pass a parameter “send_invite : true” to the POST when creating the user. That did the trick for me.