Skip to content
This repository was archived by the owner on Apr 6, 2026. It is now read-only.

Commit 99b3e98

Browse files
committed
update doc
1 parent a773091 commit 99b3e98

1 file changed

Lines changed: 26 additions & 16 deletions

File tree

README.md

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The Max API Interface allows you to interact with the Max Messenger WebSocket AP
1212

1313
To install this library, run the following command in your terminal:
1414
```bash
15-
pip install MaxBridge
15+
pip install MaxBridge
1616
```
1717

1818
### Obtaining the Authentication Token
@@ -40,10 +40,10 @@ To interact with the Max API, you'll need to authenticate and obtain a long-live
4040
To create an instance of the MaxAPI, pass the authentication token obtained from the previous step:
4141

4242
```python
43-
from MaxBridge import MaxAPI
43+
from MaxBridge import MaxAPI
4444

45-
auth_token = 'YOUR_AUTH_TOKEN_HERE'
46-
api = MaxAPI(auth_token)
45+
auth_token = 'YOUR_AUTH_TOKEN_HERE'
46+
api = MaxAPI(auth_token)
4747
```
4848

4949
### Available Methods
@@ -52,60 +52,70 @@ api = MaxAPI(auth_token)
5252

5353
To send a message, use:
5454
```python
55-
api.send_message(chat_id=12345678, text="Hello, World!")
55+
api.send_message(chat_id=12345678, text="Hello, World!")
5656
```
5757

5858
2. **Retrieving Message History:**
5959

6060
To retrieve message history, use:
6161
```python
62-
response = api.get_history(chat_id=12345678, count=20)
62+
response = api.get_history(chat_id=12345678, count=20)
6363
```
6464

6565
3. **Subscribing to a Chat:**
6666

6767
To subscribe to real-time events from a chat, use:
6868
```python
69-
api.subscribe_to_chat(chat_id=12345678, subscribe=True)
69+
api.subscribe_to_chat(chat_id=12345678, subscribe=True)
7070
```
7171

7272
4. **Marking Messages as Read:**
7373

7474
To mark a specific message as read, use:
7575
```python
76-
api.mark_as_read(chat_id=12345678, message_id="12345678")
76+
api.mark_as_read(chat_id=12345678, message_id="12345678")
7777
```
7878

7979
5. **Getting video or file**
8080

8181
To get video, use:
8282
```python
83-
api.get_video(id=12345678)
83+
api.get_video(id=12345678)
8484
```
8585
To get file, use:
8686
```python
87-
api.get_file(id=12345678, chat_id=12345678, msg_id="12345678")
87+
api.get_file(id=12345678, chat_id=12345678, msg_id="12345678")
8888
```
8989

9090
6. **Finding Contact by Phone Number:**
9191

9292
To find a contact by their phone number, use:
9393
```python
94-
api.get_contact_by_phone(phone_number="+12345678901")
94+
api.get_contact_by_phone(phone_number="+12345678901")
9595
```
9696

97-
7. **Getting Chat by ID:**
97+
7. **Getting Chats:**
9898

9999
To retrieve a specific chat by its ID, use:
100100
```python
101-
api.get_chat_by_id(chat_id="12345678")
101+
api.get_chat_by_id(chat_id="12345678")
102102
```
103103

104-
8. **Getting All Chats:**
105-
106104
To retrieve all available chats, use:
107105
```python
108-
api.get_all_chats()
106+
api.get_all_chats()
107+
```
108+
109+
8. **Logging in:**
110+
111+
To send vertify code, use:
112+
```python
113+
api.send_vertify_code(phone_number="+12345678901")
114+
```
115+
116+
to log in wth vertify code, use:
117+
```python
118+
api.check_vertify_code(code=12345678)
109119
```
110120

111121
The chat ID is required for most operations. You can obtain it from the chat URL or through other means specific to your application.

0 commit comments

Comments
 (0)