# Authenticate

Before being able to request any data, one needs to authenticate with the API. If authentication is not done, further requests will be rejected and 401 error code will be returned.
NOTE: If you encounter “Cookie Missing” error, retry the request you should be able to authenticate.

Endpoint: POST /v3/auth/web
Version: 3.0.0

## Header parameters:

  - `Content-Type` (string)

  - `RUI-Client` (string)

  - `RUI-Client-Version` (string)

  - `Origin` (string)

## Request fields (application/json):

  - `userName` (string)
    Example: test@test.com

  - `password` (string)
    Example: helloTest

## Response 200:

  - `200` (unknown)
    OK

## Response 200 headers (application/json):

  - `Server` (string)
    Example: nginx/1.20.1

  - `Date` (string)
    Example: Thu, 25 May 2023 13:02:01 GMT

  - `Content-Type` (string)
    Example: application/json

  - `Content-Length` (integer)
    Example: 1686

  - `Connection` (string)
    Example: keep-alive

  - `Access-Control-Allow-Origin` (string)
    Example: https://analytics.revenera.com

  - `Access-Control-Allow-Credentials` (boolean)
    Example: true

  - `Vary` (string)
    Example: Origin

  - `Rui-Api` (string)
    Example: RUI Admin API (3.0.0.dev14)

  - `Rui-Lib` (string)
    Example: 3.0.0.dev25

  - `Set-Cookie` (string)
    Example: RUI-Session-Token=y8bN4N6Sudn0OuN1wt6VsDROVQqX_-fL; HttpOnly; Max-Age=39600; Path=/; SameSite=Strict; Secure

  - `X-XSS-Protection` (string)
    Example: 1; mode=block

  - `X-Content-Type-Options` (string)
    Example: nosniff

  - `Referrer-Policy` (string)
    Example: no-referrer-when-downgrade

## Response 400:

  - `400` (unknown)
    Bad Request

## Response 400 headers (application/json):

  - `Server` (string)
    Example: nginx/1.20.1

  - `Date` (string)
    Example: Thu, 25 May 2023 13:04:43 GMT

  - `Content-Type` (string)
    Example: application/json

  - `Content-Length` (integer)
    Example: 67

  - `Connection` (string)
    Example: keep-alive

  - `Access-Control-Allow-Origin` (string)
    Example: https://analytics.revenera.com

  - `Access-Control-Allow-Credentials` (boolean)
    Example: true

  - `Vary` (string)
    Example: Origin

  - `Rui-Error` (string)
    Example: 400.002.002

  - `Set-Cookie` (string)
    Example: RUI-Anon-Csrf=rUjXlM5K7miDfo5NpIiBcx7qMTYSwcUXZIfejF613Y8W8HDO72u0GRn2osfcEn0M; HttpOnly; Max-Age=1200; Path=/; SameSite=Strict; Secure

