simplify credentials doc (#2488)

This commit is contained in:
Shuchang Zheng
2025-05-27 11:06:12 -07:00
committed by GitHub
parent 9e646bd9a1
commit 306eac8a58
7 changed files with 43 additions and 25 deletions

View File

@@ -12,6 +12,7 @@ Skyvern Browser Session is a way to persist the real-time state of the browser,
Skyvern Browser Sessions is currently is only available via [API & SDK](/api-reference/api-reference/browser-session/create-browser-session).
## Create a Browser Session
- [API doc](/api-reference/api-reference/browser-session/create-browser-session)
```python
from skyvern import Skyvern
@@ -22,12 +23,29 @@ browser_session = await skyvern.browser_sessions.create_browser_session(
)
```
The `timeout` parameter (`>=5, <=10080`) is the max time in minutes that the browser session can run.
- The `timeout` parameter (`>=5, <=10080`) is the max time in minutes that the browser session can run. By default, the timeout is 60 minutes.
- The `browser_session_id` the session ID you should note.
## Get A Browser Session
- [API doc](/api-reference/api-reference/browser-session/get-browser-session)
```python
from skyvern import Skyvern
## Get Information Of A Browser Session
[API doc](/api-reference/api-reference/browser-session/get-browser-session)
skyvern = Skyvern(api_key="YOUR_API_KEY")
browser_session = await skyvern.browser_sessions.get_browser_session(
browser_session_id="YOUR_BROWSER_SESSION_ID",
)
```
## Close a Browser Session
[API doc](/api-reference/api-reference/browser-session/close-browser-session)
## Close A Browser Session
- [API doc](/api-reference/api-reference/browser-session/close-browser-session)
```python
from skyvern import Skyvern
skyvern = Skyvern(api_key="YOUR_API_KEY")
await skyvern.browser_sessions.close_browser_session(
browser_session_id="YOUR_BROWSER_SESSION_ID",
)
```