https://github.com/matt0550/kenamobile-rest-api
An unofficial REST API for Kena Mobile website.
https://github.com/matt0550/kenamobile-rest-api
kenamobile python rest-api
Last synced: 9 months ago
JSON representation
An unofficial REST API for Kena Mobile website.
- Host: GitHub
- URL: https://github.com/matt0550/kenamobile-rest-api
- Owner: Matt0550
- License: gpl-3.0
- Created: 2024-09-09T10:43:39.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-20T22:47:42.000Z (over 1 year ago)
- Last Synced: 2025-04-05T23:43:57.380Z (about 1 year ago)
- Topics: kenamobile, python, rest-api
- Language: Python
- Homepage: https://kena-api.cloud.matteosillitti.it/
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![MIT License][license-shield]][license-url]
[![Discord][discord-shield]][discord-url]
[![Docker Pulls][docker-shield]][docker-url]
Kena Mobile Unofficial REST API
An unofficial REST API for Kena Mobile website.
Report Bug
·
Request Feature
This project is for educational purposes only. Please use this project responsibly.
Copyright and all rights belong to the respective owners.
## Features
- Get customer information
- Get user offers information
- Get user credit information
## API Endpoints
> [!TIP]
> The API is self-documented. You can access the Swagger UI at `/docs` and the ReDoc UI at `/redoc`.
- `/getCreditInfo?phoneNumber={phone}`: Get the credit information of a user. Phone is a string and is required.
- `/getCustomerDTO?phoneNumber={phone}`: Get the customer information of a user. Phone is a string and is required.
- `/getPromo?phoneNumber={phone}`: Get the offers information of a user. Phone is a string and is required.
> [!WARNING]
> For all the endpoints you need to pass the `PHPSESSID` in the body of the request. You can get it by logging in to the Kena Mobile website and copying the `PHPSESSID` cookie.
## TO-DO
- [X] Add Dockerfile
- [X] Add Docker Compose
- [ ] Add more endpoints
## Public instance of the API
You can use the public instance of the API at `https://kena-api.cloud.matteosillitti.it/` (click [here](https://kena-api.cloud.matteosillitti.it/)).
Limitations: 2 requests per minute, 20 requests per day. If you need more requests, [contact me](#help---feedback).
## Environment Variables (docker)
| Variable | Description | Default |
| :--- | :--- | :--- |
| `PUID` | User ID | `1000` |
| `PGID` | Group ID | `1000` |
## Installation - Using Docker Compose (recommended)
Clone the project
```yml
version: '3'
services:
kenamobile_restapi:
image: matt0550/kenamobile_restapi
environment:
- PUID=1000 # UID of the user inside the container
- PGID=1000 # GID of the user inside the container
ports:
- 5000:5000
restart: unless-stopped
```
Run the container with `docker-compose up -d`
## Installation - Using Docker Run
Pull the image
```bash
docker run -d -p 5000:5000 -e PUID=1000 -e PGID=1000 matt0550/kenamobile_restapi
```
## Installation - Self-Host or docker build
Clone the project
```bash
git clone https://github.com/Matt0550/KenaMobile-rest-api
```
Go to the project directory
```bash
cd KenaMobile-rest-api-master
```
OPTIONAL: use docker to build the image
```bash
docker build -t KenaMobile-rest-api .
```
If you don't want to use docker, skip this step.
Else, change the `image` in `docker-compose.yml` with the image name you used.
Run the container with `docker-compose up -d`
Install dependencies
```bash
pip install -r requirements.txt
```
Start the REST API (after setting the environment variables)
```bash
cd api
uvicorn api:app
```
## Help - feedback
You can contact me on:
Discord: https://matt05.it/discord
Telegram: https://matt05.it/telegram
Mail: mail@matteosillitti.com
## License
[GNU GPLv3](https://choosealicense.com/licenses/gpl-3.0/)
## Support me
[](https://ko-fi.com/matt05)
[](https://www.buymeacoffee.com/Matt0550)
[](https://paypal.me/sillittimatteo)
[contributors-shield]: https://img.shields.io/github/contributors/Matt0550/KenaMobile-rest-api.svg?style=for-the-badge
[contributors-url]: https://github.com/Matt0550/KenaMobile-rest-api/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/Matt0550/KenaMobile-rest-api.svg?style=for-the-badge
[forks-url]: https://github.com/Matt0550/KenaMobile-rest-api/network/members
[stars-shield]: https://img.shields.io/github/stars/Matt0550/KenaMobile-rest-api.svg?style=for-the-badge
[stars-url]: https://github.com/Matt0550/KenaMobile-rest-api/stargazers
[issues-shield]: https://img.shields.io/github/issues/Matt0550/KenaMobile-rest-api.svg?style=for-the-badge
[issues-url]: https://github.com/Matt0550/KenaMobile-rest-api/issues
[license-shield]: https://img.shields.io/github/license/Matt0550/KenaMobile-rest-api.svg?style=for-the-badge
[license-url]: https://github.com/Matt0550/KenaMobile-rest-api/blob/master/LICENSE
[discord-shield]: https://img.shields.io/discord/828990499507404820?style=for-the-badge
[discord-url]: https://matt05.it/discord
[docker-shield]: https://img.shields.io/docker/pulls/matt0550/kenamobile_restapi?style=for-the-badge
[docker-url]: https://hub.docker.com/r/matt0550/kenamobile_restapi