Giter VIP home page Giter VIP logo

Comments (8)

valerierx avatar valerierx commented on September 15, 2024 4

There are now two tokens to manage and store: an access_token for use with mobile.bereal.com and an id_token for use with all firebase-related stuff.

from befake.

valerierx avatar valerierx commented on September 15, 2024 1

On it right now, it appears that the 1.0 update caused some havoc. There will be breaking changes like additional photos soon

Edit: Okay, login process has gotten even more complicated. Token needs to be sent to Firebase to get another token that gets sent back to auth.bereal.team. Also choosing a device ID will be mandatory since we may need to actually register your BeFake token as an actual BeReal installation. Also @notmarek can you get me the client_id and client_secret you get at https://auth.bereal.team/token? I only have those for android that I'll publish right away, as they're the same for every build.

from befake.

sanderDijkxhoorn avatar sanderDijkxhoorn commented on September 15, 2024 1

Wrote a little example code and this works just fine got a temporary solution for myself.

const fs = require('fs');

// User info
let url = "https://mobile.bereal.com/api/feeds/friends-v1";
let AuthroizationToken = "Bearer SussyBakaDon'tTryTOStealMyToken";
let deviceId = "COOL-DEVICE-ID";

// Headers
let headers = {
    "Accept-Encoding": "br;q=1.0, gzip;q=0.9, deflate;q=0.8",
    "Accept-Language": "en-NL;q=1.0, nl-NL;q=0.9",
    "Authorization": AuthroizationToken,
    "bereal-app-language": "en-NL",
    "bereal-app-version": "1.0.1-(9513)",
    "bereal-device-id": deviceId,
    "bereal-device-language": "en",
    "bereal-os-version": "15.4.1",
    "bereal-platform": "iOS",
    "bereal-timezone": "Europe/Amsterdam",
    "bereal-user-agent": "Bereal/1.0.1 (AlexisBarreyat.BeReal; build:9513; iOS 15.4.1) 1.0.0/BRApriKit",
};

// Make a request using native fetch nodejs to the url and save the response (body) which is json to a file called response.json
fetch(url, { headers: headers })
    .then((response) => response.json())
    // Save the response (body) to a file called response.json
    .then((json) => fs.writeFileSync('response.json', JSON.stringify(json)))
    .catch((error) => console.error(error));

from befake.

ohld avatar ohld commented on September 15, 2024

The same for me. Probably, they implemented something new.

from befake.

sanderDijkxhoorn avatar sanderDijkxhoorn commented on September 15, 2024

Is there a temporarily way to manually put in my bearer token?

I got my bearer and refresh token just not sure what is saved in the token.txt

from befake.

valerierx avatar valerierx commented on September 15, 2024

token.txt stores your refresh token, but it's gonna be deprecated. You can try my WIP branch at #80 that logs perfectly with vonage if you need a solution right now.

from befake.

sanderDijkxhoorn avatar sanderDijkxhoorn commented on September 15, 2024

token.txt stores your refresh token, but it's gonna be deprecated. You can try my WIP branch at #80 that logs perfectly with vonage if you need a solution right now.

Thanks, I will check it out 👍

from befake.

ohld avatar ohld commented on September 15, 2024

For ones who asks yourself how to make the old code work:

  1. Update library. Better to clone master brunch and use it locally. Run git pull to update it.
  2. You need to update tokens
from BeFake.BeFake.BeFake import BeFake
bf = BeFake()
bf.legacy_load()
bf.save()
  1. After that you can simply bf.load() as usual. Now you got the login token updated and saved in a new format.

from befake.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.