You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to test the /users routes with Postman, but it is returning 404.
Is there a list of the available routes?
I am trying this - GET localhost:3000/v1/users/getUsers/:userId , but it returns 404
The text was updated successfully, but these errors were encountered:
@shikhardb you should instead use localhost:3000/v1/users/:userId
If you are logged in as admin (and are using the corresponding JWT token in the Authorization header), then you can get any user. If you are logged in as a user, then specifying any id for :userId other than yours will return a 403 error.
@shikhardb List of available routes (I will add them to the docs soon): Auth routes: POST /auth/register - register as a user POST /auth/login - login POST /auth/refresh-tokens - refresh access token POST /auth/forgot-password - send a reset password email POST /auth/reset-password - reset password
User routes: POST /users - create a user GET /users - get all users GET /users/:userId - get a user with id=:userId PATCH /users/:userId - update a user with id=:userId DELETE /users/:userId - delete a user with id=:userId
The user routes mentioned above are only allowed for admins (since they have the getUsers and manageUsers permissions). Regular users can only use them if their id=:userId
I am trying to test the /users routes with Postman, but it is returning 404.
Is there a list of the available routes?
I am trying this - GET
localhost:3000/v1/users/getUsers/:userId
, but it returns 404The text was updated successfully, but these errors were encountered: