Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 1.56 KB

File metadata and controls

22 lines (15 loc) · 1.56 KB

Authentication

To access the Rocket.Chat API, you need to authenticate using your username and password. This authentication method allows you to interact securely with the Rocket.Chat server and perform actions on behalf of the authenticated user.

Upon successful authentication, the API will provide an authentication token (authToken) and a unique user identifier (userId) as part of the JSON response. These values should be used as headers in subsequent requests to protected endpoints that require authentication.

{% hint style="info" %} The authTokenis passed as X-Auth-Token header, while the userId as X-User-Id header. {% endhint %}

The Rocket.Chat API also supports other forms of authentication using OAuth apps like Facebook, Google, and Twitter.

Url Short Description Details Page
/api/v1/login Authenticate with username and password. Link
/api/v1/login Authenticate with facebook. Link
/api/v1/login Authenticate with google. Link
/api/v1/login Authenticate with twitter. Link
/api/v1/logout Invalidate your REST API authentication token. Link
/api/v1/me Displays information about the authenticated user. Link