Skip to main content

What are Action Codes?

Action Codes are short-lived, one-time codes that let users approve blockchain actions from anywhere — without connecting their wallet to your app.

For Users

Generate a code in your wallet, share it, and approve requests as they come in.

For Developers

Request approvals via a simple SDK. No wallet integration needed in your app.

How it works

1

User generates a code

User opens actioncode.app in their wallet browser and gets an 8-digit code.
2

User shares the code

User pastes the code into your app, bot, or anywhere you accept it.
3

You attach an action

Your app attaches a transaction or message to the code via the SDK.
4

User approves

User sees the request in actioncode.app and signs with their wallet.
5

You get the result

Your app receives the signed transaction or message.

See it in code

import { ActionCodesClient } from '@actioncodes/sdk'

const client = new ActionCodesClient({
  authToken: process.env.ACTION_CODES_TOKEN
})

// 1. User gives you their code (e.g., "48291037")
const code = userInput

// 2. Resolve the code to verify it's valid
const actionCode = await client.resolve(code)
console.log('Code belongs to wallet:', actionCode.pubkey)

// 3. Attach a transaction for them to sign
await client.attachTransaction(code, serializedTransaction)

// 4. Wait for user to approve in their wallet
for await (const status of client.observeStatus(code)) {
  if (status.finalizedSignature) {
    console.log('Approved! Signature:', status.finalizedSignature)
    break
  }
}
Need an auth token? Request one by DMing @beharefe on Telegram or emailing gm@actioncodes.org.
Where do users get codes? Users visit actioncode.app in their Solana wallet’s browser (like Phantom or Solflare), connect their wallet, and get a code. The code is valid for about 2 minutes.

When to use Action Codes

Use CaseHow it works
Chat botsUser sends code to bot, bot attaches action, user approves in wallet
Embedded appsNo wallet extension needed — just accept a code
Cross-deviceStart on desktop, approve on mobile wallet
Backend servicesServer requests approval, user approves asynchronously
Telegram / DiscordBots can request signatures without OAuth or deep links

What it replaces

Traditional ApproachWith Action Codes
Wallet connect modalsUser enters 8 digits
OAuth redirectsNo redirects needed
QR code scanningJust type a code
Deep links (break easily)Works everywhere
Browser extension requiredNo extension needed

Get started


Action Codes Protocol is open-source (Apache-2.0).Won 4th place in infrastructure track at Colosseum Breakout Hackathon.For integrations or support, contact gm@actioncodes.org or DM @beharefe on Telegram.