> For the complete documentation index, see [llms.txt](https://docs.relysia.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.relysia.com/enterprise-wallet/authentication.md).

# Authentication

Authentication allows all types of users to obtain an Auth id\_token, which can then be utilized as an Authorization Bearer token for users with defined roles, including administrators.&#x20;

This authToken serves as proof of a user's authentication and can be used to authorize access to protected resources

#### Login

Login API allows users to securely authenticate and retrieve their Auth Token and User Role.&#x20;

The endpoint accepts HTTP POST requests and expects the following headers:

* `serviceId` (required): The unique identifier for each project.

and JSON payload with the following parameters:

* `email` (required): The email of the user.
* `password` (required): The password of the user.

```bash
curl --location --request POST 'https://api.enterprise.relysia.com/api/v1/login' \
--header 'serviceid: serviceid' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email":"test@change.com",
    "password":"password"
}
```

Upon successful authentication, the Login API returns a JSON response with the following parameters:

* token : The Auth Token used for authorization.
* role : The role of the authenticated user.
