# 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.relysia.com/enterprise-wallet/authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
