How to set Strapi user role programmatically?

Viewed 101

I'm using Strapi 3.6.10.

When I create user via http://host:1337/auth/local/register, I'm not able to achieve desirable user's role. It's always Authenticated, even if I directly set it to another in my request

{  
    "username": "user",   
    "email": "user@mail.com",  
    "password": "123456789",   
    "role": {   
        "_id": "626eacea45f0a420ccb35094"
    }
}

I've also tried using API documented in generated by Documentation plugin Swagger - PUT /users/{id}. But if I send request with new role nothing happens to my user's entry

0 Answers
Related