WaForgeDevelopers

Get started

The three keys explained

WaForge has three kinds of credentials. They are not interchangeable: each one works in one direction, for one job. If you only read one page of these docs, read this one.

wf_sk_...

Secret API key

Job: your server asks WaForge to send and check OTP codes.

Lives: on your server only (an environment variable).

Create: Dashboard, API keys, New secret key.

wf_pk_...

Widget key

Job: the OTP widget in a visitor's browser sends and checks codes.

Lives: in your web page, locked to the domains you list.

Create: Dashboard, API keys, New widget key.

wf_fs_...

Data feed secret

Job: WaForge signs its requests to your website, so the AI agent can read live prices and stock and your site knows the request is really from WaForge.

Lives: in your website's server config.

Create: Dashboard, Data feeds, Your website.

Which key do I need? #

I want to...KeyWho calls whomGuide
Verify phone numbers from my backend (sign-up, login, checkout)Secret API key wf_sk_Your server calls WaForgeOTP API guide
Add a phone check to a web page without writing backend codeWidget key wf_pk_ + allowed domainsThe visitor's browser calls WaForgeOTP widget
Let the AI agent quote my real prices, stock and order statusData feed secret wf_fs_WaForge calls your websiteConnect your website
Tell WaForge that stock or a price just changedThe same data feed secretYour server calls WaForgeChange events
Give the agent my prices from a spreadsheetNo keyWaForge reads your published sheetGoogle Sheets and CSV
Put a "Chat on WhatsApp" button on my siteNo keyThe visitor opens WhatsAppWhatsApp button

Example: a shop like BCard. To let the WhatsApp agent answer "how much is the black card?" with the live price from the shop's database, the shop needs only the data feed secret: install a kit on the website, paste the secret, run the feed checker. The API key and the widget key are only needed if the shop also wants to verify customers' phone numbers with OTP codes.

Secret API key in detail #

  • Format wf_sk_ followed by 40 hex characters. Shown once when you create it; WaForge only keeps a SHA-256 hash, so a lost key cannot be shown again: create a new one.
  • Send it as a bearer token: Authorization: Bearer wf_sk_... to https://waforge.online/api/v1/....
  • It works from any IP and any origin. That is why it must never appear in JavaScript, a mobile app, a public repository or a URL.
  • Revoke it in Dashboard, API keys. Revocation is immediate: the next call answers 401 invalid_api_key.

Widget key in detail #

  • Format wf_pk_ followed by 40 hex characters. It calls the same OTP endpoints as a secret key, but only from your allowed domains.
  • Allowed domains are exact host names, separated by commas when you create the key: shop.example.com, example.com. www.example.com is a different host and must be listed too. Subdomains are not included automatically. A widget key with no domains refuses every request.
  • WaForge reads the host from the browser's Origin header (or Referer when there is no Origin) and answers 403 origin_not_allowed when it is not on the list.

A widget key is public, not secret. The domain check stops other websites from using your key in a browser. A script outside a browser can still fake the Origin header, so the real protection is your plan's per-minute and monthly limits. Watch Dashboard, OTP logs, and revoke and replace the key if you see sends you did not expect.

Data feed secret in detail #

When you add your website in Dashboard, Data feeds, WaForge shows four values once. Copy all four into your site's config:

ValueExampleWhat it is
Feed secretwf_fs_3q2Kx... (43 characters after the prefix)The HMAC key. Secret. Stored encrypted by WaForge, never shown to the AI.
Key idfs_k3j9x0aq1m2b7cNames which secret signed a request (kid in the signature header). Not secret.
Tenant idwf_tn_Xc81...Your public account id, sent as WaForge-Tenant. Not secret.
Verification tokenwfv_9f2c...Proves you own the domain (manifest, DNS TXT or meta tag). Not secret.
  • Direction 1, WaForge to you: every request to your feed carries WaForge-Signature, an HMAC-SHA256 made with this secret. Your site recomputes it and refuses anything that does not match. See Request signing.
  • Direction 2, you to WaForge: you sign change events with the same secret.
  • Rotation: Dashboard, your feed, New secret. WaForge signs with the new secret immediately, so update your site right away (live lookups fail and the agent hands chats to you until you do). Events you send are accepted with either of your two most recent secrets.

Common mistakes #

  • Putting a wf_sk_ secret key in a web page. Use a widget key there, or call WaForge from your server.
  • Sending the feed secret to WaForge in a header. It is never sent: only the signature made with it is.
  • Using an API key to connect a data feed. API keys only work for the OTP endpoints.