LT

Kalba

PrisijungtiPradėti nemokamai
Developers: API, webhooks, MCP and integrations · 1/5

API clients and keys

Open sandbox and live clients, create keys with the narrowest scopes, rotate or revoke them.

12 min. · Kam skirta: Visi

Pamokos turinys rodomas anglų kalba; sąsaja – jūsų kalba.
Kur

Dashboard → All tools → Management → Developers → Keys (Owners and Managers only)

Atidaryti puslapį

Šios pamokos pabaigoje

You can open a sandbox client and make your first API request safely, create keys with the right scopes when going live and invalidate a leaked key within minutes.

The Reydoc API gives programmatic access to data such as campaigns, deals, affiliate and earnings. Access works through "clients" and the "keys" under them. Each key has scopes (permissions) and can only do what they allow.

There are two environments. Sandbox keys start with rd_test_ and are bound to a separate, isolated test workspace; they never touch your live data. Live keys start with rd_live_ and work with your real data. Try in the sandbox first, then go live.

Only Owners and Managers of a workspace see the Developers page; other roles see a warning that the page is for owners and managers.

Žingsnis po žingsnio

  1. Create a client

    In the Keys tab, enter a client name (2–80 characters, for example "Accounting integration") in the new client card, choose "Sandbox" as the environment and create it.

  2. Choose scopes

    Open "New key" under the client and tick only what you need. The list is filtered by workspace type: campaigns, catalog, contacts, events and automation for businesses and agencies; links and listings (creating listings) for creators only; earnings:read for creators and agencies; deals:read, deals:write (offers, acceptance, deliveries, messages), affiliate:read and webhooks for everyone.

  3. Set the validity

    Enter a validity of 1–730 days (empty means no expiry). Prefer regular rotation over keys valid for more than a year.

  4. Create the key and store it immediately

    Create the key. The secret is shown only once; Reydoc keeps only a hash and you cannot see it later. Put it straight into your server's secret variables (for example .env or a secrets vault).

  5. Make the first request

    The API documentation is at /api/v1/docs. Send the key in the "Authorization: Bearer <key>" header. Requests that create campaigns or offers require a unique "Idempotency-Key" header, so retrying after a network error never creates duplicates.

  6. Rotate or revoke a key

    "Rotate" creates a new key; the old one expires within 24 hours while you switch over. "Revoke" kills the key immediately (use it if you suspect a leak). "Close client" permanently revokes all of the client's keys.

Taisyklės ir ribos

  • Up to 10 active clients per workspace and 5 active keys per client.
  • The per-minute limit is 600 live and 120 sandbox; responses include X-RateLimit-* headers and Retry-After when the limit is exceeded.
  • Revocation reasons are recorded: manual, rotation, member left, client closed, administrator.
  • A key with a scope that does not fit the workspace type is not created (api_scope_invalid).

Patarimai

  • Open a separate client per integration: if one leaks, you close only that one.
  • On a 429 response, wait for Retry-After before retrying; do not retry in a tight loop.
  • When someone leaves the team, rotate the keys of the integrations they set up.

Dažnos klaidos

  • Putting a key in a mobile app, browser code or a public repository: keys belong on the server only.
  • Closing the page without saving the secret: you cannot see it again and must create a new key.
  • Expecting to see live data with a sandbox key: the sandbox is a separate test workspace.
  • Creating campaigns or offers without an Idempotency-Key.

Dažnai užduodami klausimai

Can I use the API as a creator?

Yes. Creator workspaces have links, listings, earnings:read, deals:read, deals:write, affiliate:read and webhooks scopes; for example you can pull your earnings into your own spreadsheet, create listings and answer incoming offers.

Jūsų pažanga saugoma tik šioje naršyklėje.

Susijusios pamokos

API clients and keys · Reydoc Academy