# API Shape

## Auth

`POST /api/auth`

Request:

```json
{
  "device_id": "DEMO-DEVICE",
  "app_version": "3.8",
  "device_type": "mobile"
}
```

Response:

```json
{
  "mac_registered": true,
  "mac_address": "DEMO-DEVICE",
  "device_key": "DEMO-DEVICE",
  "expire_date": "2027-06-20",
  "urls": [
    {
      "id": "1",
      "name": "Demo RexTV",
      "type": "xc",
      "url": "https://your-domain.com/player_api.php?username=demo&password=demo",
      "is_protected": "0"
    }
  ],
  "languages": [
    {
      "id": "1",
      "code": "en",
      "name": "English",
      "words": {}
    }
  ]
}
```

## Xtream Login

`GET /player_api.php?username=demo&password=demo`

## Live Categories

`GET /player_api.php?username=demo&password=demo&action=get_live_categories`

## Live Streams

`GET /player_api.php?username=demo&password=demo&action=get_live_streams`

