By integrating Apple Shortcuts with Octoclip, you can automate the process of copying SMS verification codes (OTPs) and instantly sync them to your computer, tablet, or other devices for hands-free pasting.

IMPORTANT

This guide requires iOS 16.0 or later and the official Apple Shortcuts app pre-installed on your iPhone.

Verification codes are sensitive

This automation copies your SMS codes into the system clipboard, so the Apple Shortcut reads the SMS and places the code on your clipboard. Octoclip then syncs that copied clipboard content to your other devices according to your sync settings. Only set this up on devices you trust, and clear or shorten history retention if you'd rather not keep codes around.

For Cloud Sync users: Cloud Sync content is end-to-end encrypted between your own devices — you set the encryption key, and it's stored in your device's secure keychain, not on any Octoclip server. Even so, treat verification codes with the same care you would any sensitive credential.


Prerequisites

Before starting, ensure that:

  1. Octoclip is installed and set up on your iOS device.
  2. Nearby Sync or Cloud Sync is configured and active so that copied content can sync to other devices.
  3. You have enabled running untrusted shortcuts in your system settings if prompted.

1. Download the Shortcut

Download the pre-configured iCloud shortcut to your device:

1

Get Shortcut

Click the Quick Copy SMS Shortcut Link on your iOS device.

2

Safari Redirect

Safari will open the iCloud link. Tap Get Shortcut.

3

Open Shortcuts App

The system will redirect you to the official Shortcuts app. Tap the Set Up Shortcut or Add Shortcut button.

4

Grant Permissions

Grant any requested permissions for the shortcut to copy text and run.


2. Configure Automatic Extraction Trigger

Set up a background automation that runs whenever a new verification SMS arrives:

1

Open Automation Tab

Open the Shortcuts app on your iPhone and select the Automation tab at the bottom.

2

Create Automation

Tap the + (plus) icon in the top right to create a new automation.

3

Choose Message Trigger

Scroll down and choose Message as the trigger.

4

Set Message Parameters

Set the condition parameters:

  • Sender: Any Sender
  • Message Contains: Enter Verification (or common OTP keywords like Code, OTP, 验证码 depending on your typical message language).
  • Run: Select Run Immediately so it executes in the background without asking.
  • Notify When Run: Keep disabled to avoid duplicate notifications.
5

Tap Next

Tap Next.

6

Link Shortcut

In the search box, find and select the Quick Copy SMS shortcut you downloaded in Step 1.

7

Save and Finish

Tap Done to save the automation.


How to Verify Success

To confirm that your verification codes sync automatically:

  1. Request a verification SMS from any service (or have a friend text you a message containing the word "Verification").
  2. When the SMS arrives, the Shortcuts app will run in the background.
  3. Open your computer or target device and trigger a paste (⌘+V or Ctrl+V). The verification code digits should be pasted immediately.

Frequently Asked Questions

How do I get a verification code on my computer?

The workflow this guide sets up does exactly that. The Apple Shortcut reads the incoming SMS, extracts the code, and copies it to your iPhone's clipboard. Octoclip then syncs that clipboard content to your other devices (Mac, Windows PC, iPad, and so on), where it's ready to paste. You never have to pick up your phone to read the code.

Can I see a verification code from my phone on my Mac or Windows PC?

Yes — that's the end result of this setup. After the Shortcut runs and Octoclip syncs the code, it appears in your Octoclip clip history on your Mac or PC. Press the paste shortcut (⌘+V or Ctrl+V) and the code fills in. Both Nearby Sync (local network, no cloud) and Cloud Sync (works anywhere) are supported.

How do I use a two-step verification code on my PC?

Set up this guide on your iPhone. When a two-factor authentication (2FA) code arrives by SMS, the Shortcut copies it automatically and Octoclip syncs it to your Windows PC. Open the login form on your PC and paste as you normally would. The whole process — from SMS arriving to code ready to paste — typically takes just a few seconds.

Does Octoclip read my SMS messages?

No. Octoclip only syncs content that has already been copied to the clipboard. The Apple Shortcut is what reads the SMS and extracts the code; it then copies the code to the clipboard. From that point on, Octoclip handles only the clipboard content — it never accesses your messages directly.

Is it safe to sync verification codes through Cloud Sync?

Cloud Sync content is end-to-end encrypted between your own devices: each clip is encrypted on your device with a key you set, and only devices configured with that same key can decrypt it. Octoclip never sees your content or your key. That said, treat synced codes with the same care as any sensitive credential — clear your clip history after use if you prefer not to retain codes.


Troubleshooting

Untrusted Shortcut Warnings

If iOS warns you that the shortcut cannot be opened because it is untrusted:

  1. Go to iPhone Settings > Shortcuts.
  2. Enable Allow Untrusted Shortcuts. (Note: If this option is grayed out, run any random default shortcut in the Shortcuts app first, then check settings again).

Automation Not Triggering

  • Verify that Run Immediately is checked in the automation options.
  • Make sure the text in the message matches the exact keyword you configured (e.g., Verification).

Still Not Solved?

If the SMS is not syncing to nearby devices, please file a support ticket in the Community Forum:

  • iOS Version:
  • Octoclip iOS Version:
  • Shortcut Trigger (Immediate/Ask):
  • Sync Method Used: Nearby Sync / Cloud Sync
  • Error message shown (if any):

Related Guides

通过将 Apple「快捷指令」与章鱼速贴深度集成,你可以自动提取收到的短信验证码,并即时同步至你的电脑、平板等其他设备,在不拿起手机的情况下直接粘贴。

IMPORTANT

本指南要求 iPhone 运行 iOS 16.0 或更高版本,且系统已预装官方的「快捷指令」App。

验证码属于敏感信息

该自动化由 Apple 快捷指令负责读取短信并提取验证码,随后将其复制到 iPhone 的系统剪贴板。章鱼速贴只同步已复制到剪贴板的内容,不直接访问你的短信。请只在你信任的设备上配置;如果不希望验证码长期留存,可清理历史或缩短历史保留时长。

使用云同步的用户请注意:云同步内容在你自己的设备之间端到端加密——你设定加密密钥,密钥保存在设备的安全存储中,不上传至任何章鱼速贴服务器。即便如此,请像对待其他敏感凭证一样对待已同步的验证码。


前置条件

开始配置前,请确保:

  1. iPhone 已安装并完成章鱼速贴客户端的初始设置。
  2. 已配置并激活附近同步云同步,确保设备间能够互传内容。
  3. 允许运行不受信任的快捷指令(如果系统有此安全提示)。

1. 下载快捷指令

在 iPhone 上下载我们预先配置好的快捷指令:

1

获取快捷指令

2

自动跳转

系统将自动跳转至 Safari,点击「获取快捷指令」。

3

添加指令

随后系统会打开「快捷指令」App,点击「设置快捷指令」或「添加快捷指令」。

4

授予权限

按照系统提示,授予该快捷指令拷贝文本与运行的权限。


2. 配置自动触发规则

设置后台自动化,让系统在收到验证码短信时自动执行拷贝动作:

1

打开自动化

打开 iPhone 上的「快捷指令」App,切换至底部的「自动化」标签页。

2

新建自动化

点击右上角的 +(加号)按钮,新建个人自动化。

3

选择触发源

在列表里向下滑动,选择「信息」作为触发源。

4

配置信息条件

配置触发条件:

  • 发件人:任何发件人
  • 信息包含:填入 验证(或者根据你的接收习惯,填入 CodeOTP验证码 等关键字)。
  • 运行方式:勾选「立即运行」(确保后台自动执行,无需手动确认)。
  • 运行时通知:建议关闭,避免重复弹窗打扰。
5

点击下一步

点击「下一步」。

6

关联指令

在操作搜索框中,找到并选择刚刚下载的「快速拷贝短信」快捷指令。

7

保存退出

点击「完成」保存设置。


验证成功

按照以下步骤测试同步是否生效:

  1. 从任意平台请求发送一条验证码短信(或者让朋友给你发一条包含"验证"字样的短信)。
  2. 收到短信后,「快捷指令」会在后台静默运行。
  3. 在你的电脑或目标设备上直接触发粘贴(⌘+VCtrl+V),验证码数字应已成功填入。

常见问题

怎么在电脑上收到手机的验证码?

本指南配置的工作流正是实现这一目的。Apple 快捷指令读取收到的短信、提取验证码并复制到 iPhone 的剪贴板。章鱼速贴随后将该剪贴板内容同步至你的其他设备(Mac、Windows 电脑、iPad 等),在那里直接粘贴即可,全程不需要拿起手机查看。

能在 Mac 或 Windows 上查看手机里的验证码吗?

可以——这正是本文配置完成后的效果。快捷指令运行、章鱼速贴同步完成后,验证码会出现在 Mac 或 Windows 上的章鱼速贴剪贴历史中。在登录表单上按 ⌘+VCtrl+V 即可填入。支持附近同步(本地网络、无需云端)和云同步(在任何地点均可使用)。

如何在 PC 上使用两步验证码?

在 iPhone 上完成本指南的配置。当短信验证码到达时,快捷指令自动拷贝,章鱼速贴将其同步至 Windows 电脑。在 PC 的登录表单中正常粘贴即可。从短信到达到验证码可粘贴,整个过程通常只需几秒钟。

章鱼速贴会读取我的短信吗?

不会。章鱼速贴只同步已复制到剪贴板的内容。读取短信并提取验证码的是 Apple 快捷指令;提取后将验证码复制到剪贴板,章鱼速贴从那一刻起只处理剪贴板内容,从不直接访问你的短信。

通过云同步传输验证码安全吗?

云同步内容在你自己的设备之间端到端加密:每条剪贴在设备上使用你设定的密钥加密后再上传,只有配置了相同密钥的设备才能解密。章鱼速贴既看不到内容,也看不到密钥。即便如此,建议像对待其他敏感凭证一样对待已同步的验证码——如果不希望留存,使用后清理剪贴历史即可。


常见排查

不受信任的快捷指令报错

如果 iOS 提示由于安全限制无法打开此快捷指令:

  1. 前往 iPhone 「设置」 > 「快捷指令」。
  2. 开启「允许不受信任的快捷指令」。(提示:如果该选项呈灰色不可选状态,请先在快捷指令 App 中随便运行一次任意默认指令,然后重新进入设置)。

自动化未被触发

  • 检查自动化设置中是否已勾选「立即运行」。
  • 确保收到的短信内容确实包含了你设置的关键字(例如 验证)。

仍未解决?

如果短信依然无法同步至附近设备,请前往社区交流群提交排查单:

  • iOS 系统版本
  • 章鱼速贴 App 版本
  • 快捷指令运行设置(立即运行/确认后运行)
  • 同步方式:附近同步 / 云同步
  • 错误提示或现象描述

相关指南