> ## Documentation Index
> Fetch the complete documentation index at: https://resources.begenuin.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

The **Authentication** API provides users with a secure access token. This token is essential for running other APIs within the application.

**URL**  :  `/api/thirdparty/auth`

**Method**  :  `POST`

**Auth required**  : YES

**Mandatory Fields** : api\_key, api\_secret

**Obtain Your API Key**: Contact the Genuin team to obtain your unique API\_KEY. This key is essential for authenticating your application with the Genuin service.

# Request Body

```json theme={null}
{ "api_key": "YOUR_API_KEY", "api_secret": "YOUR_API_SECRET" }
```

## Success Response

**Condition**: If `api_key` and `api_secret` are okay, `gn-access-token` will be generated  in the `Body` > `Header`.

**Code**: `200`

**Note**: Only with the help of this `gn-access-token`, you will be able to use other APIs

## General Error

**Condition**: If the request contains errors or invalid data, authentication will fail.

**Code**: `400`

Content

```json theme={null}
{
  "code": "1099",
  "message": "An unexpected error occurred processing the request",
  "data": {}
}

```

## Parameters Missing

**Condition**: -   If required parameters are missing, authentication will not be processed.

**Code**: 404

**Content**

```json theme={null}
{
  "code": "5235",
  "message": "Brand not exists.",
  "data": {}
}
```

## Precondition Failed

**Condition**: If a precondition is not met, the authentication process will be denied, preventing further access.

**Code**: `412`

**Content**

```json theme={null}
{
  "code": "5166",
  "message": "XXXX-[Invalid Use of API]",
  "data": {}
}
```
