Skip to content

Matt0550/KenaMobile-rest-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Forks Stargazers Issues MIT License Discord Docker Pulls


Logo

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

  • Add Dockerfile
  • 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). Limitations: 2 requests per minute, 20 requests per day. If you need more requests, contact me.

Environment Variables (docker)

Variable Description Default
PUID User ID 1000
PGID Group ID 1000

Installation - Using Docker Compose (recommended)

Clone the project

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

  docker run -d -p 5000:5000 -e PUID=1000 -e PGID=1000 matt0550/kenamobile_restapi

Installation - Self-Host or docker build

Clone the project

  git clone https://github.com/Matt0550/KenaMobile-rest-api

Go to the project directory

  cd KenaMobile-rest-api-master

OPTIONAL: use docker to build the image

  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

  pip install -r requirements.txt

Start the REST API (after setting the environment variables)

  cd api
  uvicorn api:app

Help - feedback

You can contact me on:

Discord: https://go.matteosillitti.it/discord

Telegram: https://go.matteosillitti.it/telegram

Mail: me@matteosillitti.it

License

GNU GPLv3

Support me

ko-fi

buy-me-a-coffee

paypal