A Python API wrapper for BeReal
Caution
This uses only reverse-engineered code. I am not to be held responsible for any consequences of the use of this library. Your account may be banned, you might get ratelimited, use this with caution.
This library is currently in a broken state due to changes in the API. Please see rvaidun/befake#199
Warning
For now the project is NOT on pypi.
# Windows:
pip install git+https://github.com/StarNumber12046/BeReal.py
# Macos/Linux:
pip3 install git+https://github.com/StarNumber12046/BeReal.py
- Types
- Semi-functioning eror handling
- Current user profile
- Feed
- Friends enumeration
- Friends profiles
- RealMojis
- Comments
- FriendsOfFriends feed
- Actual error handling
- Posting
Special thanks to macedonga with beunblurred for having already done part of the reverse engineering
import BeReal, json
client = BeReal.client("+12345678901")
# Send and verify OTP
client.send_code()
otp = input("You should have received an authentication code. Please check your phone and enter it below.")
client.verify_code(otp)
# Initialize the client with BeReal-provided tokens
client.initialize_client()
# Save credentials
f = open("creds.json", "w")
f.write(json.dumps(client.save_session()))
f.close()
# Get logged in user
me = client.me()
print(f"Username: {me.username}")
for friend in me.friends:
print(f"Friend: {friend.username}")
You can use my examples. Do it in this order:
- Example/auth.py (login)
- Example/example.py (actual data)
- (If the token expires) Example/refresh_token.py