Many Rocket.Chat endpoints require user authentication and can only be accessed by users who have an account on the workspace. To test these endpoints in the sandbox environment, you must first register yourself as a user.
Open the Register User endpoint and enter the required parameters in the Body section of the Try it! panel. For example:
{
"username": "rogersmith",
"email": "roger@example.com", // you can enter any email ID
"pass": "passw0rd",
"name": "" // this parameter is required, but you can enter an empty string.
}Now, click Try it!
If successful, you will see a response containing the details of the user profile you just created in the sandbox workspace. This endpoint does not require authentication, so you can test it immediately. Likewise, any endpoint that does not require authentication can be tested without logging in.
In the sandbox environment, your account is assigned the
userrole, which includes a predefined set of permissions. You cannot modify roles or permissions for any user in the sandbox.
Next, we'll look at how to create an authentication token.