Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
Update 2FA docs to reference workflows (#6010)
Suchintan1b2e2da34c14
diff --git a/.github/workflows/auto-merge-sync.yml b/.github/workflows/auto-merge-sync.ymlindex 1576c088c..da1d81450 100644--- a/.github/workflows/auto-merge-sync.yml+++ b/.github/workflows/auto-merge-sync.yml@@ -19,7 +19,7 @@ jobs:ref: ${{ github.event.pull_request.head.sha }}repo-token: ${{ secrets.GITHUB_TOKEN }}wait-interval: 10- ignore-checks: auto-merge+ ignore-checks: auto-merge, Mintlify Deploymentallowed-conclusions: success, skipped, neutral- name: Set token for authorid: set-tokendiff --git a/docs/cloud/managing-credentials/totp-setup.mdx b/docs/cloud/managing-credentials/totp-setup.mdxindex 8a2ecb947..3d1cf31e5 100644--- a/docs/cloud/managing-credentials/totp-setup.mdx+++ b/docs/cloud/managing-credentials/totp-setup.mdx@@ -173,7 +173,7 @@ This turns email-based 2FA into something nearly as automated as an authenticatoInstead of pushing codes to Skyvern, you can have Skyvern pull them from your server. Pass `totp_url` when running a [task](/cloud/getting-started/run-from-code) or [workflow](/cloud/building-workflows/build-a-workflow), and Skyvern will call your endpoint when it needs a verification code.-Your endpoint must accept a POST request with `task_id`, `workflow_run_id`, and `workflow_permanent_id` in the body, and return:+Your endpoint must accept POST requests from Skyvern. For workflow runs, use the `workflow_run_id` in the signed request body to find the matching code, ignore any additional metadata fields, then return:```json{diff --git a/docs/developers/credentials/handle-2fa.mdx b/docs/developers/credentials/handle-2fa.mdxindex b64874e7b..f406e6551 100644--- a/docs/developers/credentials/handle-2fa.mdx+++ b/docs/developers/credentials/handle-2fa.mdx@@ -239,28 +239,30 @@ Use a virtual phone number service like [Twilio](https://www.twilio.com/en-us/do</Accordion></AccordionGroup>-### Step 2: Start the run with a TOTP identifier+### Step 2: Start the workflow run with a TOTP identifier-When running your login, include a `totp_identifier` that matches what you'll use when pushing codes:+When running the workflow that performs the login, include a `totp_identifier` that matches what you'll use when pushing codes:<CodeGroup>```python Python-result = await client.login(- credential_type="skyvern",- url="https://portal.example.com/login",- credential_id="cred_xyz789",+result = await client.run_workflow(+ workflow_id="wpid_abc123",+ parameters={+ "login_credential": "cred_xyz789",+ },totp_identifier="[email protected]", # Must match when pushing code)``````bash cURL-curl -X POST "https://api.skyvern.com/v1/run/tasks/login" \+curl -X POST "https://api.skyvern.com/v1/run/workflows" \-H "x-api-key: $SKYVERN_API_KEY" \-H "Content-Type: application/json" \-d '{- "credential_type": "skyvern",- "url": "https://portal.example.com/login",- "credential_id": "cred_xyz789",+ "workflow_id": "wpid_abc123",+ "parameters": {+ "login_credential": "cred_xyz789"+ },"totp_identifier": "[email protected]"}'```@@ -314,7 +316,7 @@ Instead of pushing codes to Skyvern, you implement an endpoint that Skyvern poll### Step 1: Implement the endpoint-Your endpoint must accept POST requests and return the verification code:+Your endpoint must accept POST requests and return the verification code. For workflow runs, use the `workflow_run_id` in the request body to find the matching code in your system, and ignore any additional metadata fields Skyvern includes:**Request from Skyvern:**```http@@ -323,7 +325,7 @@ x-skyvern-signature: <hmac-sha256-signature>Content-Type: application/json{- "task_id": "tsk_123456"+ "workflow_run_id": "wr_123456"}```@@ -355,28 +357,30 @@ def verify_skyvern_request(request, api_key: str) -> bool:return hmac.compare_digest(signature, expected)```-### Step 3: Configure the login+### Step 3: Configure the workflow run-Pass `totp_url` when running your login:+Pass `totp_url` when running the workflow that performs the login:<CodeGroup>```python Python-result = await client.login(- credential_type="skyvern",- url="https://portal.example.com/login",- credential_id="cred_xyz789",+result = await client.run_workflow(+ workflow_id="wpid_abc123",+ parameters={+ "login_credential": "cred_xyz789",+ },totp_url="https://your-server.com/totp-webhook",)``````bash cURL-curl -X POST "https://api.skyvern.com/v1/run/tasks/login" \+curl -X POST "https://api.skyvern.com/v1/run/workflows" \-H "x-api-key: $SKYVERN_API_KEY" \-H "Content-Type: application/json" \-d '{- "credential_type": "skyvern",- "url": "https://portal.example.com/login",- "credential_id": "cred_xyz789",+ "workflow_id": "wpid_abc123",+ "parameters": {+ "login_credential": "cred_xyz789"+ },"totp_url": "https://your-server.com/totp-webhook"}'```diff --git a/docs/developers/credentials/troubleshooting-login.mdx b/docs/developers/credentials/troubleshooting-login.mdxindex 37b25b35b..54ac99db4 100644--- a/docs/developers/credentials/troubleshooting-login.mdx+++ b/docs/developers/credentials/troubleshooting-login.mdx@@ -144,11 +144,10 @@ curl -X GET "https://api.skyvern.com/v1/credentials/totp?totp_identifier=user@ex-H "x-api-key: $SKYVERN_API_KEY"```-4. **For pull-based 2FA**: Check your endpoint returns the correct format:+4. **For pull-based 2FA**: Check your endpoint uses the incoming `workflow_run_id` to find the code and returns the correct format:```json{- "task_id": "tsk_123456","verification_code": "123456"}```