Skip to main content
Credentials let you store login information (username/password, TOTP secrets) securely in Skyvern’s vault. Reference them by ID in tasks and workflows instead of passing secrets in your code.

create_credential

Store a new credential.
credential = await client.create_credential(
    name="my-app-login",
    credential_type="password",
    credential={
        "username": "demo@example.com",
        "password": "s3cur3-p4ss",
    },
)
print(credential.credential_id)

Parameters

ParameterTypeRequiredDescription
namestrYesDisplay name for the credential.
credential_typeCredentialTypeYesType of credential.
credentialCreateCredentialRequestCredentialYesThe credential data. Shape depends on credential_type.

Returns CredentialResponse


get_credentials

List all credentials. Credential values are never returned — only metadata.
creds = await client.get_credentials()
for c in creds:
    print(f"{c.name} ({c.credential_id})")

Parameters

ParameterTypeRequiredDefaultDescription
pageintNoNonePage number.
page_sizeintNoNoneResults per page.

Returns list[CredentialResponse]


get_credential

Get a single credential’s metadata by ID.
cred = await client.get_credential("cred_abc123")
print(cred.name, cred.credential_type)

Parameters

ParameterTypeRequiredDescription
credential_idstrYesThe credential ID.

Returns CredentialResponse


delete_credential

Delete a credential.
await client.delete_credential("cred_abc123")

Parameters

ParameterTypeRequiredDescription
credential_idstrYesThe credential ID to delete.

send_totp_code

Send a TOTP (time-based one-time password) code to Skyvern during a run that requires 2FA. Call this when your webhook or polling detects that Skyvern is waiting for a TOTP code.
await client.send_totp_code(
    totp_identifier="demo@example.com",
    content="123456",
)

Parameters

ParameterTypeRequiredDescription
totp_identifierstrYesThe identifier matching the totp_identifier used in the task/workflow.
contentstrYesThe TOTP code value.
task_idstrNoAssociate with a specific task run.
workflow_idstrNoAssociate with a specific workflow.
workflow_run_idstrNoAssociate with a specific workflow run.
sourcestrNoSource of the TOTP code.
expired_atdatetimeNoWhen this code expires.
typeOtpTypeNoOTP type.

Returns TotpCode