This project is a web-based key generator designed specifically for the "Hamster" game on Telegram. In the "Hamster" game, players typically need to participate in various mini-games within the playground to earn keys. This project allows users to bypass the gameplay and generate keys directly through the interface.
- Select Key Type: Users can choose a key type from a dropdown menu.
- Generate Keys: Users can generate keys by clicking a button.
- Responsive Design: The layout is responsive and adjusts to different screen sizes.
- HTML
- CSS
- JavaScript
To run this project locally, follow these steps:
- Clone the repository:
git clone https://github.com/mamadceto/H-P-G.git
- Navigate to the project directory:
cd H-P-G
- Open
index.html
in your browser:open index.html
- Open the
index.html
file in your web browser. - Select a key type from the dropdown menu.
- Click the "Generate Keys" button to generate keys.
This project uses several APIs to handle the key generation process. Below are the details of these APIs and how they are used:
-
Login Client API
- Endpoint:
https://api.gamepromo.io/promo/login-client
- Method:
POST
- Description: Logs in a client using the
appToken
andclientId
, and returns aclientToken
. - Request Body:
{ "appToken": "your-app-token", "clientId": "generated-client-id", "clientOrigin": "deviceid" }
- Response:
{ "clientToken": "generated-client-token" }
- Endpoint:
-
Register Event API
- Endpoint:
https://api.gamepromo.io/promo/register-event
- Method:
POST
- Description: Emulates progress by registering an event using the
clientToken
andpromoId
. - Request Body:
{ "promoId": "your-promo-id", "eventId": "generated-event-id", "eventOrigin": "undefined" }
- Response:
{ "hasCode": true }
- Endpoint:
-
Create Code API
- Endpoint:
https://api.gamepromo.io/promo/create-code
- Method:
POST
- Description: Generates a key using the
clientToken
andpromoId
. - Request Body:
{ "promoId": "your-promo-id" }
- Response:
{ "promoCode": "generated-promo-code" }
- Endpoint:
To customize the project, you can modify the HTML, CSS, and JavaScript files:
- HTML (
index.html
): Modify the structure and content of the web page. - CSS (
styles.css
): Change the styles, colors, and layout. - JavaScript (
script.js
): Add or modify the functionality of the key generation process.
For any inquiries or feedback, please contact @mmdceto.