# Login

## Send login data

<mark style="color:green;">`POST`</mark> `https://api.auth.gg/v1/`

This endpoint allows you to license any language that can make web requests

#### Query Parameters

| Name     | Type   | Description                                                             |
| -------- | ------ | ----------------------------------------------------------------------- |
| type     | string | login                                                                   |
| hwid     | string | Hardware-ID                                                             |
| password | string | Password                                                                |
| username | string | Username                                                                |
| secret   | string | Secret is found in applications tab                                     |
| apikey   | string | API Key is found in profile settings, only available to premium members |
| aid      | string | AID is found in profile settings                                        |

{% tabs %}
{% tab title="200 " %}

```
Responsed on the bottom
```

{% endtab %}
{% endtabs %}

### Raw POST example

```
POST /v1 HTTP/1.1
Host: api.auth.gg
Content-Type: application/x-www-form-urlencoded
Content-Length: 124

type=login&aid=76471&apikey=156444483727231153&secret=aIGeWaR4YHR3LBCvtr4yOtDlb0HI4MA0gBL&username=demo&password=demo&hwid=demo
```

{% hint style="info" %}
All responses are encoded in JSON
{% endhint %}

### Login Successful

```
{
"result":"success", 
"id":"31905", 
"username":"demo", 
"hwid":"", 
"email":"demo@demo.com", 
"uservar":"demo", 
"rank":"0", 
"ip":"demo", 
"expiry":"2020-10-03 11:22:24", 
"variables":{"f4Jf2vOrL0rFVBUdeaKekeOgMMAB9":"demo"}"
}
```

### Login Invalid

```
{
"result":"invalid_details"
}
```

### Invalid HWID

```
{
"result":"invalid_hwid"
}
```

### HWID Updated

```
{
"result":"hwid_updated"
}
```

### Subscription Expired

```
{
"result":"time_expired"
}
```
