Skip to content

Commit b8c7ffb

Browse files
chore(docs): use environment variables for authentication in code snippets
1 parent 366d69a commit b8c7ffb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,17 @@ pip install beeper_desktop_api[aiohttp]
8585
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
8686

8787
```python
88+
import os
8889
import asyncio
8990
from beeper_desktop_api import DefaultAioHttpClient
9091
from beeper_desktop_api import AsyncBeeperDesktop
9192

9293

9394
async def main() -> None:
9495
async with AsyncBeeperDesktop(
95-
access_token="My Access Token",
96+
access_token=os.environ.get(
97+
"BEEPER_ACCESS_TOKEN"
98+
), # This is the default and can be omitted
9699
http_client=DefaultAioHttpClient(),
97100
) as client:
98101
page = await client.chats.search(

0 commit comments

Comments
 (0)