π§© API for Fragment (fragment.com): purchase of Telegram Stars and Premium π§©
-
πΈ Purchase Telegram Stars & Premium
-
β‘οΈ Works with or without KYC
-
π Bypass Fragment purchase limits
-
π Full end-to-end encryption
-
π§© No API key or registration required
-
π No TON API required
-
π Multi-transaction support
-
π Simple integration
-
π Optimized for automation
-
π§ Developer-friendly
Online documentation is available here: https://fragment-api.net
-
β TON Wallet v4r2 πͺ
-
β TON Wallet should be Active (send any transaction from it) πͺ
-
β Seed should be base64-encoded π
-
β Fragment account with linked TON wallet and Telegram account π
-
β KYC verification on Fragment π
-
β Export cookies from Fragment πͺ (as Header String using Cookie Editor extension)
-
β Fragment cookies should be base64-encoded π
import requests
import base64
url = "https://api.fragment-api.net/buyStars"
headers = {
"Content-Type": "application/json"
}
username = "@durov" # Replace with the Telegram username
amount = 100 # Replace with the number of stars to purchase
fragment_cookies = base64.b64encode(b"your_fragment_cookies").decode("utf-8") # Replace with Fragment cookies (Copy from Cookie Editor extension as "Header String")
seed = base64.b64encode(b"your_seed").decode("utf-8") # Replace with TON seed
# Request payload
data = {
"username": username,
"amount": amount,
"fragment_cookies": fragment_cookies,
"seed": seed
}
try:
# Sending POST request
response = requests.post(url, headers=headers, json=data)
# Handling success responses
if response.status_code == 200:
result = response.json()
if result.get("success"):
print("\nπ Purchase completed successfully!")
print(f"π€ Username: {username}")
print(f"β¨ Stars purchased: {amount}")
else:
print("\nβ οΈ Purchase failed.")
print(f"β Reason: {result.get('message', 'Unknown error')}")
# Handling other responses
elif response.status_code == 400:
print("\nβ οΈ Bad Request.")
print(f"Message: {response.json().get('message', 'Invalid request data')}")
elif response.status_code == 422:
print("\nβ οΈ Validation Error.")
print(f"Message: {response.json().get('message', 'Validation failed')}")
elif response.status_code == 500:
print("\nπ₯ Server Error.")
print(f"Message: {response.json().get('message', 'Internal server error')}")
else:
print("\nβ Unexpected status code:", response.status_code)
print("Response:", response.json())
# Handling request exceptions
except requests.RequestException as e:
print("\nπ¨ Request failed:", str(e))
Fees depend on your daily turnover and needs. To get more information, contact the developer: https://t.me/NightStrang6r
Please rate this repository by giving it a star rating in the top right corner of the GitHub page (you must be logged in to your account). Thank you β€οΈ
Β© Leonid Tsaruk 2025
This repository is licensed under GNU GENERAL PUBLIC LICENSE.