How to create a Regular user account using Admin's session id

I’m trying to create a Regular user account using Admin’s session id in postman using rest API but it shows Response body as Invalid method call can you help me with a an example API for creating a user

Hi and welcome!
Just tested it with a very simple request, but it did work directly:

Request:

method: set_entry

{
	"session": "{{my-sessionid}}",
    "module_name":"Users",
    "name_value_list":{
         "user_name":"apitest"
     }
}

Response:

{
    "id": "<someId>",
    "entry_list": {
        "user_name": {
            "name": "user_name",
            "value": "apitest"
        }
    }
}

I have tried with the following rest data

{“session”:"mysessionid,“module_name”:“Users”,“name_value_list”:{“user_name”:“myusername”,“status”:“Active”,“first_name”:“myfirstname”,“last_name”:“mylastname”,“new_password”:“123”}}

But when i tried to login with the credentials that i created using the V4 API in postman My SuiteCRM login page says “You must specify a valid username and password”.

Did you check if the user was created (are you able to see him in the users list)?
If so, please try to submit the password as md5-hash.

Ya the user that i have created was stored in the database even i have tried the md5 password to login but it was not working. Should I give my password in MD5 when creating an account in postman?

You should try to provide the new user’s password as md5, and verify afterwards if the same hash is visible in the users table (->I could imagine your CRM is automatically creating a new password that overwrites the one you provided).

Can you mention the parameter name for creating the password, Is new_password is a valid parameter?

mh…I guess the correct column is called “user_hash” :slight_smile:

Should i send my password in md5 with user_hash parameter?

I have tried it with user_hash parameter but the userhash value for that user is null

you’re right, doesn’t work for me too :frowning: But I don’t know why, usually it works to use the exact column names.

But maybe this is an alternative: you can configure Suite to automatically create passwords and mail them to the new users, would that work for you?

I didn’t try that Can you mention how to do that?