Hi I want to create all the roles before hand when...
# support-questions-legacy
s
Hi I want to create all the roles before hand when initializing the UserRoles. Is it possible to do it in the override in the UserRoles.init()? If it is I also want to know which field exactly I can do it.
r
hey @Sekai you can use the core API to create the roles directly.
s
Are you talking about this one?

https://cdn.discordapp.com/attachments/1101594777872515143/1101755316149956660/image.png

r
yea
see the cURL tab on the right
s

https://cdn.discordapp.com/attachments/1101594777872515143/1101755617821073418/image.png

where is the most common place this call this tho?
r
i mean just call it whenevr you want to create a role
s
I want to create all the roles at the start of my application
but I don't think I can create the roles before UserRoles is initialized
so I was thinking if I can call that API in the UserRoles.init()
r
You can. Just send an axios call to the core
s
oh wait you can
like I can just call that curl command and supertoken will always remember that role?
r
yeaaa..
cause it's saved in the core
in the db
s
ohhhh
ty ty
I understand now. I knew I was missing something. I thought like the role is saved in my next.js application
Thank you for taking your time and helping me