Hello,
I need to assign a user to a role from an external tool, e.g. Postman, unfortunately I receive the message “no authorization”. Where is one placed?
Is this for a Wix App/Headless site, or for a site built on the Wix/Wix Studio editor?
Wix App/Headless Site
- Only admins can assign roles.
Make sure you are calling the endpoint with proper authorization.
Site built on Wix/Wix Studio
You can assign a role to a member using the assignRole() method from the Wix Members Backend API. If you would like to expose this api you can do so via http functions. If you are considering building such a endpoint, it should be done securely through methods such as HMAC authentication.