Farther ShoreDocs
Go to Farther Shore
Getting startedCore conceptsLaunch checklist
ProductsUpstream routingEnvironmentsDeveloper portals
Billing strategiesPlans and limitsSubscribersAPI keys
Gateway enforcementUsage meteringLimits and creditsGateway sharding
Launch a request-counted product15mAdd monthly included usageAdd subscription plus overageCreate a prepaid credits productMeter AI token usageAdd a custom meterIssue and test an API keyDebug a denied requestUpdate product docsPrepare for launch
TroubleshootingGateway response codesMeter namingPlatform docs publishing
Status
Docs/Cookbook/Issue and test an API key

Issue and test an API key

Verify a subscriber can call your live product.

PreviousAdd a custom meterNextDebug a denied request

On this page

StepsTest requestExpected successTest missing keyTest revoked keyDebug checklist

Use this recipe whenever you publish a new product, change a plan, or debug subscriber access.

Steps

  1. Open the product in the developer portal.
  2. Subscribe with a test subscriber.
  3. Create an API key.
  4. Copy the key once and store it securely for the test.
  5. Send a request through the product hostname.
  6. Confirm the upstream receives the request.
  7. Confirm usage is recorded.
  8. Revoke the key and confirm requests fail.

Test request

curl https://<product-host>/v1/example \
  -H "Authorization: Bearer <subscriber-api-key>"

Expected success

The response should come from your upstream API. If the gateway wraps or changes the response, document that in product docs.

Test missing key

curl https://<product-host>/v1/example

This should fail before reaching the upstream.

Test revoked key

After revoking the key:

curl https://<product-host>/v1/example \
  -H "Authorization: Bearer <revoked-api-key>"

This should return a gateway authentication or authorization error.

Debug checklist

  • Are you using the product hostname, not the upstream hostname?
  • Are you using a subscriber API key, not a builder token?
  • Is the subscription active?
  • Is the product published?
  • Did the gateway receive the latest edge configuration?