> ## Documentation Index
> Fetch the complete documentation index at: https://docs.privy.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Authorize a transaction

Propose an intent to authorize and execute a signature or transaction.

This endpoint accepts the same request body as the synchronous [RPC](/wallets/using-wallets/rpc) endpoint but does **not** require authorization signatures in the request. Instead, the intent is [signed](/transaction-management/intents/sign-intents) separately and executes once enough signatures are collected.

<Info>
  Intents expire 72 hours after creation by default. Signers must
  [authorize](/transaction-management/intents/sign-intents) them within this window.
</Info>

<Tabs>
  <Tab title="REST API">
    ```bash theme={"system"}
    curl -X POST https://api.privy.io/v1/intents/wallets/<wallet_id>/rpc \
      -u "<your-privy-app-id>:<your-privy-app-secret>" \
      -H "privy-app-id: <your-privy-app-id>" \
      -H "Content-Type: application/json" \
      -d '{
        "method": "eth_sendTransaction",
        "caip2": "eip155:8453",
        "sponsor": "true",
        "params": {
          "transaction": {
            "to": "0xE3070d3e4309afA3bC9a6b057685743CF42da77C",
            "value": "0x2386F26FC10000"
          }
        }
      }'
    ```
  </Tab>

  <Tab title="Node SDK">
    ```typescript {skip-check} theme={"system"}
    import {PrivyClient, type EthereumSendTransactionRpcInput} from '@privy-io/node';

    const client = new PrivyClient({
      appId: 'your-app-id',
      appSecret: 'your-app-secret'
    });

    const rpcRequest: EthereumSendTransactionRpcInput = {
      method: 'eth_sendTransaction',
      caip2: 'eip155:8453',
      sponsor: true,
      params: {
        transaction: {
          to: '0xE3070d3e4309afA3bC9a6b057685743CF42da77C',
          value: '0x2386F26FC10000'
        }
      }
    };

    const intent = await client.intents().rpc('insert-wallet-id', rpcRequest);

    console.log(intent.intent_id, intent.status, intent.authorization_details);
    ```
  </Tab>

  <Tab title="Go SDK">
    ```go theme={"system"}
    import privy "github.com/privy-io/go-sdk"

    client := privy.NewPrivyClient(privy.PrivyClientOptions{
        AppID:     "your-app-id",
        AppSecret: "your-app-secret",
    })

    transaction := privy.UnsignedStandardEthereumTransaction{
        To: privy.String("0xE3070d3e4309afA3bC9a6b057685743CF42da77C"),
        Value: privy.QuantityUnion{
            OfString: privy.String("0x2386F26FC10000"),
        },
    }

    rpcInput := &privy.EthereumSendTransactionRpcInput{
        Method: privy.EthereumSendTransactionRpcInputMethodEthSendTransaction,
        Caip2:  "eip155:8453",
        Params: privy.EthereumSendTransactionRpcInputParams{
            Transaction: transaction,
        },
    }

    intent, err := client.Intents.Rpc(ctx, "wallet-id", privy.IntentRpcParams{
        WalletRpcRequestBody: privy.WalletRpcRequestBodyUnion{
            OfEthSendTransaction: rpcInput,
        },
    })
    ```
  </Tab>

  <Tab title="Ruby SDK">
    ```ruby theme={"system"}
    require "privy"

    client = Privy::PrivyClient.new(
      app_id: "your-app-id",
      app_secret: "your-app-secret"
    )

    intent = client.intents.rpc(
      "wallet-id",
      wallet_rpc_request_body: {
        method: "eth_sendTransaction",
        caip2: "eip155:8453",
        params: {
          transaction: {
            to: "0xE3070d3e4309afA3bC9a6b057685743CF42da77C",
            value: "0x2386F26FC10000"
          }
        }
      }
    )

    puts(intent.intent_id, intent.status, intent.authorization_details)
    ```
  </Tab>

  <Tab title="Java SDK">
    ```java theme={"system"}
    import io.privy.api.PrivyClient;
    import io.privy.api.models.components.*;
    import io.privy.api.models.operations.IntentRpcResponse;

    PrivyClient client = PrivyClient.builder()
        .appId("your-privy-app-id")
        .appSecret("your-app-secret")
        .build();

    IntentRpcResponse intent = client.intents().rpc(
        "insert-wallet-id",
        EthereumSendTransactionRpcInput.builder()
            .method(EthereumSendTransactionRpcInputMethod.ETH_SEND_TRANSACTION)
            .caip2("eip155:8453")
            .sponsor(true)
            .params(EthereumSendTransactionRpcInputParams.builder()
                .transaction(UnsignedEthereumTransaction.of(UnsignedStandardEthereumTransaction.builder()
                    .to("0xB00F0759DbeeF5E543Cc3E3B07A6442F5f3928a2")
                    .value(Quantity.of("0x2386F26FC10000"))
                    .build()))
                .build())
            .chainType(RpcChainType.ETHEREUM)
            .build(),
        null);
    ```
  </Tab>
</Tabs>

From the response, note the returned `intent_id`.

View the [API reference](/api-reference/intents/rpc) for submitting an RPC intent.

## Next steps

<CardGroup cols={2}>
  <Card title="Sign intents" icon="signature" href="/transaction-management/intents/sign-intents">
    Add authorization signatures to execute a proposed intent.
  </Card>

  <Card title="Intent status" icon="arrows-spin" href="/transaction-management/intents/lifecycle">
    Track an intent from proposal to execution.
  </Card>
</CardGroup>
