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

# Export Secrets

> This operation exports the Secrets file as a passphrase-encrypted JSON data of TSS Node. You can then use the [Import Secrets](https://www.cobo.com/developers/v2/developer-tools/ucw-sdk/other-apis/import-secrets) operation to restore the Secrets file.

<Tip>
  Try [Cobo WaaS Skill](/v2/guides/overview/cobo-waas-skill) in your AI coding assistant (Claude Code, Cursor, etc.). Describe your needs in natural language to auto-generate production-ready SDK code and debug faster 🚀
</Tip>

<Info>A Secrets file contains all essential information about the TSS Node, including TSS Node ID and key shares.</Info>

<CodeGroup>
  ```Swift iOS theme={null}
  public func exportSecrets(exportPassphrase: String) throws -> String
  ```

  ```Dart Flutter theme={null}
  Future<String> exportSecrets(String exportPassphrase) async
  ```
</CodeGroup>

<RequestExample>
  ```Swift iOS theme={null}
  let exportPassphrase = "wZdcycVuexvmgt7aMkaeA_2_ioCKrw!B"

  do {
      if let jsonRecoverySecrets = try sdkInstance?.exportSecrets(exportPassphrase: exportPassphrase) {
          print("\(jsonRecoverySecrets)\n")
      } else {
          print("Failed to export Secrets")
      }
  } catch {
      print("Error: \(error)")
  }
  ```

  ```Dart Flutter theme={null}
  const String exportPassphrase = "wZdcycVuexvmgt7aMkaeA_2_ioCKrw!B";

  try {
      final jsonRecoverySecrets = await sdkInstance?.exportSecrets(
          exportPassphrase: exportPassphrase
      );
      print("$jsonRecoverySecrets\n");
  } catch (error) {
      print("Error: $error");
  }
  ```
</RequestExample>

## Parameters

<ParamField path="exportPassphrase" type="string">
  The passphrase used to encrypt the exported JSON data of TSS Nodes. Must be at least 16 characters long.
</ParamField>

## Response

<ResponseField name="jsonRecoverySecrets" type="string">
  The exported passphrase-encrypted JSON data of Secrets, which includes the TSS Node ID and all recovery key shares.
</ResponseField>
