Skip to content

Commit

Permalink
hotfix: update bereal headers (#14)
Browse files Browse the repository at this point in the history
* fix: update `Bereal-Device-Id`, `BeReal-Timezone` and `Bereal-Signature`

* add: newly required env `variables`

* fix: make `bereal-timezone` and env variable
  • Loading branch information
Jabolol authored Mar 30, 2024
1 parent 465e15d commit 1d22962
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,23 @@ Create and fill in the `.env` file:
GITHUB_TOKEN=
# Google Analytics tracking ID (Optional)
GA4_MEASUREMENT_ID=

# BeReal Signature
BEREAL_SIGNATURE=

# BeReal Device ID
BEREAL_DEVICE_ID=

# BeReal Timezone
BEREAL_TIMEZONE=
```

> [!WARNING]\
> The `BEREAL_SIGNATURE` and `BEREAL_DEVICE_ID` are required for the app to
> function. You can find them by inspecting the network requests made by the
> BeReal app in a rooted Android device using
> [Burp Suite](https://portswigger.net/burp) and [Frida](https://frida.re/).
Run the development server:

```sh
Expand Down
9 changes: 4 additions & 5 deletions client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ export const headers = (_templates: TemplateStringsArray, token: string) => ({
"Bereal-Device-Language": "en-US",
"Bereal-App-Version": "1.19.6",
"Bereal-Os-Version": "10",
"Bereal-Device-Id": "7ee4e0f891cca704",
"Bereal-Timezone": "Europe/Madrid",
"Bereal-Device-Id": Deno.env.get("BEREAL_DEVICE_ID")!,
"Bereal-Timezone": Deno.env.get("BEREAL_TIMEZONE")!,
"Bereal-App-Version-Code": "1631",
"Bereal-Signature":
"MToxNzA2MDMzNzU0ODg2Oup7dtgGFyaMYEr29QlXEJt44RxF6dBBpN+PpYPz+7Zn",
"Authorization": `Bearer ${token}`,
"Bereal-Signature": Deno.env.get("BEREAL_SIGNATURE")!,
"User-Agent": "okhttp/4.12.0",
"Authorization": `Bearer ${token}`,
});

const refresh = () => ({
Expand Down

0 comments on commit 1d22962

Please sign in to comment.