How do I authenticate RevenueDot API requests?

Send every key as a bearer token: Authorization: Bearer <key>. Which key depends on the API:

Credential Looks like Use it for Keep it
Public app key appl_..., goog_..., test_... SDK endpoints for that app In your app. It is public by design
Secret key sk_... REST API v1, REST API v2, extensions, and SDK endpoints from your backend On your servers only
Dashboard session cookie rd_session REST API v2 from the dashboard, for every project you belong to In the browser
Pub/Sub push token Google-signed JWT Google Play notifications, when pubsub_audience is set Sent by Google
SCIM token (Enterprise) rdscim_... The SCIM 2.0 service of one organization In your identity provider

Security schemes in the OpenAPI document#

  • publicApiKey: A public app key (appl_, mac_, goog_, test_, amzn_, strp_, rcb_, pdl_, roku_). Safe to ship in an app. The SDK sends it on every request.
  • secretApiKey: A project secret key (sk_...). Server side only. Its permissions limit what it can do.
  • dashboardSession: The dashboard session cookie from POST /auth/login. It authorizes /v2 for every project the user belongs to.
  • subscriberToken: A subscriber access token: rdat_... from POST /v2/projects/{project_id}/apps/{app_id}/authenticate, or the JWT access_token of an Auth sign-in (POST /v1/auth/login). It speaks for one app user id of one app for one hour. An expired or revoked token, or a path or body naming another app user id, answers 401 with code 7224.
  • scimToken: RevenueDot Enterprise. A SCIM token (rdscim_ and 64 hex characters) from Organization settings → SCIM provisioning or POST /v2/organizations/{org_id}/scim/tokens. It speaks for one organization and works only on /scim/v2.
  • importToken: An import token (rdi_ and 64 hex characters) from Receive a project on the server a project moves to (POST /v2/imports/tokens). It lets one project move into the account that created it and lasts 24 hours.
  • googlePubSubOidc: Google-signed OIDC token of a Pub/Sub push subscription. Checked only when the app's pubsub_audience credential is set.

Where keys come from#

  • Public app key: created with the app. Read it with GET /v2/projects/{project_id}/apps/{app_id}/public_api_keys or on the app's dashboard page. During a migration you can keep your RevenueCat key with POST /v2/projects/{project_id}/import/apps/{app_id}/public_key.
  • Secret key: POST /v2/projects/{project_id}/api_keys or the dashboard's API keys page. The key is shown once. RevenueDot stores only its SHA-256 hash.
  • OAuth for MCP clients: an MCP client can get a secret key through OAuth 2.1 with PKCE. The user picks one project and read or read-write access.

Permissions (secret keys)#

A secret key belongs to one project and holds a list of permissions. * allows everything. A read_write permission also allows read. A prefix wildcard such as customer_information:* allows every permission under it. Dashboard users with the viewer role get only read permissions. A key can only create keys with permissions it holds itself.

Permissions the operations use:

  • audiences:audiences:read
  • audiences:audiences:read_write
  • charts_metrics:charts:read
  • charts_metrics:charts:read_write
  • charts_metrics:overview:read
  • customer_information:customers:read
  • customer_information:customers:read_write
  • customer_information:invoices:read
  • customer_information:purchases:read
  • customer_information:purchases:read_write
  • customer_information:subscriptions:read
  • customer_information:subscriptions:read_write
  • iam:authorization:issue_token
  • project_configuration:api_keys:read
  • project_configuration:api_keys:read_write
  • project_configuration:apps:read
  • project_configuration:apps:read_write
  • project_configuration:audit_logs:read
  • project_configuration:collaborators:read
  • project_configuration:discounts:read
  • project_configuration:discounts:read_write
  • project_configuration:entitlements:read
  • project_configuration:entitlements:read_write
  • project_configuration:integrations:read
  • project_configuration:integrations:read_write
  • project_configuration:offerings:read
  • project_configuration:offerings:read_write
  • project_configuration:packages:read
  • project_configuration:packages:read_write
  • project_configuration:products:read
  • project_configuration:products:read_write
  • project_configuration:projects:read
  • project_configuration:projects:read_write
  • project_configuration:virtual_currencies:read
  • project_configuration:virtual_currencies:read_write

Each operation's section on the reference pages lists the permissions it needs. A missing permission answers 403 authorization_error and names it.

Common mistakes#

  • A public key on REST API v2 answers 403: "API v2 requires a secret API key (sk_...)".
  • A secret key in an app gives anyone who unpacks the app full access to your project. Delete it (DELETE /v2/projects/{project_id}/api_keys/{key_id}) and create a new one.
  • Another project's id with a valid key answers 404, not 403, so ids cannot be probed.