> For the complete documentation index, see [llms.txt](https://admincode.gitbook.io/admincode/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://admincode.gitbook.io/admincode/basics/apis-and-integrations/rest-api-authentication.md).

# Rest API Authentication

To use Bearer Token Authentication in a REST API, follow these steps:

1. **Obtain a Token**:

   * Use the authentication service to obtain a bearer token. Typically, you'll send a POST request with credentials to the authentication endpoint *api/v1/auth,* that returns a token.

   ```
   POST /api/v1/auth/
   {
     "username": "yourUsername",
     "password": "yourPassword"
   }
   ```

   The response should include a token:

   ```json
   {
     "token": "bearer token"
   }
   ```
