Skip to content

API keys

Ferry has two key types with intentionally different jobs.

PrefixScopeWhere it belongsWhat it does
pk_One projectiOS, Android, Flutter, and React Native appsAuthorizes SDK link handling, matching, supported events, and optional client-created links
sk_One workspaceA trusted server or an MCP clientManages links, domains, and analytics across the workspace

Use pk_ in every SDK

The public project key is not a secret. Ferry expects it to be bundled with your app. It cannot perform unrestricted workspace operations, and each key resolves to exactly one project.

Use the key from the same project that owns your link hostname:

pk_test_xxx

Use environment-specific app configuration when you have separate development and production Ferry projects. A test build should not report activity to the production project.

Keep sk_ out of apps

An sk_ key authorizes control-plane operations and bypasses normal workspace role checks. Never place it in:

  • Mobile source code.
  • A compiled app environment file.
  • An iOS property list or Android resource.
  • React Native or Flutter application configuration.
  • Logs, crash reports, screenshots, or example projects.

Use an sk_ key only from a trusted server or an MCP client you control.

Common configuration mistake

If the SDK silently delivers no link, verify that its pk_ key belongs to the same Ferry project as the hostname being opened. A public key from another project cannot resolve or attribute that link.