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.
Python uses snake_case (e.g., create_credential); TypeScript uses camelCase (e.g., createCredential). Parameter tables show Python names. TypeScript names are the camelCase equivalents.
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.
vault_typeCredentialVaultTypeNoWhich vault to store this credential in. If omitted, uses the default.
request_optionsRequestOptionsNoPer-request configuration (see below).

Returns CredentialResponse


Request options

Override timeout, retries, or headers for this call by passing request_options (Python) or a second options argument (TypeScript).
from skyvern.client.core import RequestOptions

request_options=RequestOptions(
    timeout_in_seconds=120,
    max_retries=3,
    additional_headers={"x-custom-header": "value"},
)
Option (Python)Option (TypeScript)TypeDescription
timeout_in_secondstimeoutInSecondsint / numberHTTP timeout in seconds.
max_retriesmaxRetriesint / numberRetry count.
additional_headersheadersdict / Record<string, string>Extra headers.
additional_query_parameters-dictExtra query parameters.
additional_body_parameters-dictExtra body parameters.
-abortSignalAbortSignalSignal to cancel the request.
-apiKeystringOverride API key.