Troubleshoot stub API errors

What 401, 403, 404, 429 and empty responses from the stub API mean, and the fix for each — usually a key, a business or a date range.

Pro
This is available on the Growing Business or Established Entrepreneur plans

An integration stopped working — the website that raises your invoices, the dashboard reading your numbers — and somewhere a message like "401" or "403" is staring back. Those numbers are simply how programs report what went wrong, and each one narrows the problem down.

Most stub API errors come down to one of five causes, and each has a quick check. Work down this list — or hand it to your developer — and you'll usually be unblocked in a minute or two, no ticket needed.

401 Unauthorized

Your API key is missing, wrong, or has been rotated.

  1. Go to SettingsBusinessAdvanced.
  2. Copy the API key again and check it against what your integration is sending.
  3. Check you are sending it in the right header — see developers.stub.africa.

If someone rotated the key, everything using the old one stops immediately — paste in the current key and you're back.

403 Forbidden

The key doesn't reach that business. Check you are pairing the right API key with the right Business ID — each business has its own of both, and a key from one can't read another's books. See Find your IDs and keys.

429 Too Many Requests

You are calling too fast. Back off and retry, increasing the wait each time.

404 Not Found

Usually the wrong Business ID, or a record that belongs to another business. Confirm the ID under SettingsBusinessAdvanced.

Getting nothing back

  • Check the business you are pointing at actually has the data — switch to it in stub and look.
  • Check your date range. Most list endpoints are scoped to a period.

Read the docs

Endpoints, schemas and examples: developers.stub.africa.

Still stuck?

Get in touch with support from inside stub. Include your Business ID — it lets support find your account without you sending anything sensitive.

Never send anyone your API key, including support. If you think it has leaked, rotate it. See Get your API key.