How can I add user, using API?

Can I add user using API? If yes, what’s the best practice?

Hi @fellipeh:

For adding the user using API please check the following Frappe Rest API

First you will need to login using API, then you will be able to add the user

e.g.
login : POST http://frappe.local:8000/api/method/login?usr=Administrator&pwd=admin
create user : POST http://frappe.local:8000/api/resource/User
and pass the mandatory fields like email, first name in dictionary

data: {“email”:“newuser@gmail.com”, “first_name”:“First Name”}

Thanks,
Makarand

1 Like

Thanks!