credential management documentation (#2389)
This commit is contained in:
76
fern/credentials/passwords.mdx
Normal file
76
fern/credentials/passwords.mdx
Normal file
@@ -0,0 +1,76 @@
|
||||
---
|
||||
title: Password Management
|
||||
subtitle: How to manage passwords in Skyvern. How Skyvern agent uses passwords.
|
||||
slug: credentials/passwords
|
||||
---
|
||||
|
||||
## Password Management
|
||||
|
||||
You can store passwords information in Skyvern. Skyvern agent can use the stored password information to log into a website without sending your username or password to LLMs.
|
||||
|
||||
## Manage passwords in Skyvern Cloud
|
||||
You can go to [Skyvern's Credentials page](https://app.skyvern.com/credentials) to manage your passwords.
|
||||
**Add a new password credential:**
|
||||
|
||||
<img src="../images/credential_management/add_password.png" />
|
||||
|
||||
Besides the username and password, you can also add the Two Factor Authentication (TOTP) information with the authentication key/secret. If you need to set up TOTP, here are some guides from popular authenticator apps: [Bitwarden](https://bitwarden.com/help/integrated-authenticator/#manually-enter-a-secret), [1Password](https://support.1password.com/one-time-passwords#on-1passwordcom), and [LastPass](https://support.lastpass.com/s/document-item?language=en_US&bundleId=lastpass&topicId=LastPass/create-totp-vault.html&_LANG=enus).
|
||||
|
||||
<img src="../images/credential_management/add_password_detail.png" />
|
||||
|
||||
**Delete a password credential:**
|
||||
|
||||
Click the trash icon and confirm the deletion. If you do this, the password will be deleted from Skyvern PERMANENTLY.
|
||||
<img src="../images/credential_management/delete_password.png" />
|
||||
|
||||
**Update a password credential:**
|
||||
<Warning>Skyvern only allows adding and deleting passwords. If you would like to update a password, you need to delete the existing password and create a new one.</Warning>
|
||||
|
||||
## Manage passwords with Skyvern's API or SDK
|
||||
We also have [API and SDK](/api-reference/api-reference/credentials/create-credential) supports for password management:
|
||||
|
||||
**Create a new password credential:**
|
||||
|
||||
<CodeBlocks>
|
||||
```python title="python"
|
||||
from skyvern import Skyvern
|
||||
|
||||
skyvern = Skyvern(api_key="your_api_key")
|
||||
await skyvern.credentials.create_credential(
|
||||
name="My Credential",
|
||||
credential_type="password",
|
||||
credential={"username": "username", "password": "password"},
|
||||
)
|
||||
```
|
||||
|
||||
```bash title="curl"
|
||||
curl -X POST https://api.skyvern.com/v1/credentials \
|
||||
-H "x-api-key: YOUR_API_KEY" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"name": "My Credential",
|
||||
"credential_type": "password",
|
||||
"credential": {
|
||||
"password": "securepassword123",
|
||||
"username": "user@example.com",
|
||||
"totp": "JBSWY3DPEHPK3PXP"
|
||||
}
|
||||
}'
|
||||
```
|
||||
</CodeBlocks>
|
||||
|
||||
**Delete a password credential:**
|
||||
|
||||
<CodeBlocks>
|
||||
```python title="python"
|
||||
from skyvern import Skyvern
|
||||
|
||||
skyvern = Skyvern(api_key="your_api_key")
|
||||
await skyvern.credentials.delete_credential(credential_id="cred_123456789")
|
||||
```
|
||||
|
||||
```bash title="curl"
|
||||
curl -X POST https://api.skyvern.com/v1/credentials/cred_1234567890/delete \
|
||||
-H "x-api-key: YOUR_API_KEY"
|
||||
```
|
||||
</CodeBlocks>
|
||||
Reference in New Issue
Block a user