Sign inSign up

matt0550/kenamobile_restapi

By matt0550

โ€ขUpdated about 2 years ago

An unofficial REST API for Kena Mobile website.

Image
0

224

matt0550/kenamobile_restapi repository overview

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)

VariableDescriptionDefault
PUIDUser ID1000
PGIDGroup ID1000

Clone the project

version: '3'

services:
  eurostreaming_scraping:
    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: [email protected]โ 

โ License

GNU GPLv3โ 

โ Support me

ko-fi

buy-me-a-coffee

paypal

Tag summary

Content type

Image

Digest

sha256:8fefe9a59โ€ฆ

Size

171 MB

Last updated

about 2 years ago

docker pull matt0550/kenamobile_restapi