Skip to content
This repository was archived by the owner on Mar 17, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions _data/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@
- create
- createToken
- delete
- forgotPassword
- getAvatar
- getPresence
- get-preferences
Expand Down
2 changes: 2 additions & 0 deletions contributing/documentation/documentation-map/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ Here you can also find what articles are incomplete and missing.
- Rest API:
- Authentication:
- facebook
- forgotPassword
- google
- login
- logout
Expand Down Expand Up @@ -366,6 +367,7 @@ Here you can also find what articles are incomplete and missing.
- create
- createToken
- delete
- forgotPassword
- getAvatar
- getPresence
- getPreferences
Expand Down
19 changes: 10 additions & 9 deletions developer-guides/rest-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ When calling a production Rocket.Chat server, ensure it is running via HTTPS and

### Authentication

| Url | Short Description | Details Page |
| :--------------- | :------------------------------------------------- | :-------------------------------- |
| `/api/v1/login` | Authenticate with the REST API. | [Link](authentication/login/) |
| `/api/v1/login` | Authenticate with google. | [Link](authentication/google/) |
| `/api/v1/login` | Authenticate with facebook. | [Link](authentication/facebook/) |
| `/api/v1/login` | Authenticate with twitter. | [Link](authentication/twitter/) |
| `/api/v1/logout` | Invalidate your REST API authentication token. | [Link](authentication/logout/) |
| `/api/v1/me` | Displays information about the authenticated user. | [Link](authentication/me/) |
| Url | Short Description | Details Page |
| :------------------------ | :------------------------------------------------- | :----------------------------------------- |
| `/api/v1/login` | Authenticate with the REST API. | [Link](authentication/login/) |
| `/api/v1/login` | Authenticate with google. | [Link](authentication/google/) |
| `/api/v1/login` | Authenticate with facebook. | [Link](authentication/facebook/) |
| `/api/v1/login` | Authenticate with twitter. | [Link](authentication/twitter/) |
| `/api/v1/logout` | Invalidate your REST API authentication token. | [Link](authentication/logout/) |
| `/api/v1/me` | Displays information about the authenticated user. | [Link](authentication/me/) |

### Users

Expand All @@ -43,6 +43,7 @@ When calling a production Rocket.Chat server, ensure it is running via HTTPS and
| `/api/v1/users.create` | Create a new user. | [Link](users/create/) |
| `/api/v1/users.createToken` | Create a user authentication token. | [Link](users/createtoken/) |
| `/api/v1/users.delete` | Deletes an existing user. | [Link](users/delete/) |
| `/api/v1/users.forgotPassword` | Send email to reset your password. | [Link](users/forgotpassword/) |
| `/api/v1/users.getAvatar` | Gets the URL for a user's avatar. | [Link](users/getavatar/) |
| `/api/v1/users.getPresence` | Gets the online presence of the a user. | [Link](users/getpresence/) |
| `/api/v1/users.info` | Gets a user's information, limited to the caller's permissions. | [Link](users/info/) |
Expand All @@ -51,7 +52,7 @@ When calling a production Rocket.Chat server, ensure it is running via HTTPS and
| `/api/v1/users.resetAvatar` | Reset a user's avatar | [Link](users/resetavatar/) |
| `/api/v1/users.setAvatar` | Set a user's avatar | [Link](users/setavatar/) |
| `/api/v1/users.update` | Update an existing user. | [Link](users/update/) |
| `/api/v1/users.updateOwnBasicInfo` | Update basic information of own user. | [Link](users/updateownbasicinfo/) |
| `/api/v1/users.updateOwnBasicInfo` | Update basic information of own user. | [Link](users/updateownbasicinfo/) |
| `/api/v1/users.getPreferences` | Gets all preferences of user. | [Link](users/get-preferences/) |
| `/api/v1/users.setPreferences` | Set user's preferences | [Link](users/set-preferences/) |

Expand Down
16 changes: 8 additions & 8 deletions developer-guides/rest-api/authentication/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ The authentication with the REST API is a two step process.
1. Passing your username and password to the `/api/v1/login`
2. Using the `authToken` and `userId` provided back on every method

| Url | Short Description | Details Page |
| :--------------- | :------------------------------------------------- | :---------------- |
| `/api/v1/login` | Authenticate with the REST API. | [Link](login/) |
| `/api/v1/login` | Authenticate with facebook. | [Link](facebook/) |
| `/api/v1/login` | Authenticate with google. | [Link](google/) |
| `/api/v1/login` | Authenticate with twitter. | [Link](twitter/) |
| `/api/v1/logout` | Invalidate your REST API authentication token. | [Link](logout/) |
| `/api/v1/me` | Displays information about the authenticated user. | [Link](me/) |
| Url | Short Description | Details Page |
| :------------------------ | :------------------------------------------------- | :----------------------- |
| `/api/v1/login` | Authenticate with the REST API. | [Link](login/) |
| `/api/v1/login` | Authenticate with facebook. | [Link](facebook/) |
| `/api/v1/login` | Authenticate with google. | [Link](google/) |
| `/api/v1/login` | Authenticate with twitter. | [Link](twitter/) |
| `/api/v1/logout` | Invalidate your REST API authentication token. | [Link](logout/) |
| `/api/v1/me` | Displays information about the authenticated user. | [Link](me/) |
1 change: 1 addition & 0 deletions developer-guides/rest-api/users/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
| `/api/v1/users.create` | Create a new user. | [Link](create/) |
| `/api/v1/users.createToken` | Create a user authentication token. | [Link](createtoken/) |
| `/api/v1/users.delete` | Deletes an existing user. | [Link](delete/) |
| `/api/v1/users.forgotPassword` | Send email to reset your password. | [Link](forgotpassword/) |
| `/api/v1/users.getAvatar` | Gets the URL for a user's avatar. | [Link](getavatar/) |
| `/api/v1/users.getPresence` | Gets the online presence of the a user. | [Link](getpresence/) |
| `/api/v1/users.info` | Gets a user's information, limited to the caller's permissions. | [Link](info/) |
Expand Down
34 changes: 34 additions & 0 deletions developer-guides/rest-api/users/forgotpassword/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Forgot Password

| URL | Requires Auth | HTTP Method |
| :----------------------------- | :------------ | :---------- |
| `/api/v1/users.forgotPassword` | `no` | `POST` |

## Payload

| Argument | Example | Required | Description |
| :--------- | :------------------------------ | :------- | :------------------------------------ |
| `email` | `email@rocket.cat` | Required | The email to send password reset link |

## Example Call - As JSON

```bash
curl -H "Content-type:application/json" \
http://localhost:3000/api/v1/users.forgotPassword \
-d '{ "email": "email@rocket.cat" }'
```

## Result

```json
{
"status": "success"
}
```

## Change Log

| Version | Description |
| :--- | :--- |
| 0.64.0 | Added |