Missing, invalid or expired API credentials
Fix 401, 403 and 402 answers from the APIs: unauthenticated, invalid_key, account_inactive, api_not_allowed, subscription_expired and plan_feature, and how to renew a key in the panel.
Last updated 22 October 2026 · Last verified 22 October 2026
What it means#
Every call to the merchant API (/api/v1) or the company API (/api/company/v1) is checked in a fixed order: the key, then the account, then the plan. The first check that fails stops the call and returns the standard error envelope with an error.code. Nothing is created or charged. This page maps each answer to its cause and fix.
Who is affected#
Merchants using the merchant API key, and company admins using the company API key. API keys have no expiry date, so a "key expired" situation is really a key that was renewed or revoked, or a plan or subscription that ended.
Likely causes#
Add Accept-Language: en to get the English messages below; the default is Arabic.
| HTTP | error.code |
Message (English) | Cause |
|---|---|---|---|
| 401 | unauthenticated |
Send the key in the header: Authorization: Bearer <API key> |
No Authorization: Bearer header, a different scheme (for example Basic), an empty key, or the key sent in the URL or body |
| 401 | invalid_key |
The key is invalid or revoked. Generate a new key from the merchant dashboard. | The key was renewed or revoked, mistyped, masked, or belongs to another key type. The company text ends with "from the company dashboard ← Integrations and API." |
| 403 | account_inactive |
Merchant account suspended or not found. / Company account suspended. | The user, the merchant profile or the company is suspended or missing |
| 403 | api_not_allowed |
Your account belongs to a delivery company — the API is for platform merchant accounts only. | Merchant API only: you are a merchant of a delivery company |
| 402 | subscription_expired |
Company subscription expired — renew the subscription from the company dashboard. | Company API only: the company subscription ended |
| 403 | plan_feature |
You do not have an active merchant plan subscription — subscribe to use «API (API keys to connect with any system)». Or: Feature «…» is not included in your current plan — upgrade your plan from the subscription page. Company API, one of two texts: Feature «Company API» is not included in your company plan — upgrade the plan from the subscription page. Or: Your company subscription has expired — renew the subscription to use «Company API». | No active merchant plan, or the plan has no API feature. Company API: the company plan has no API feature, or the company has no currently active subscription (for example one that has not started yet) |
A 429 with rate_limited is a plan limit, not a credentials problem; see the rate limit article. A common pitfall: a key with a stray quote, space inside, or masked characters is simply a different key, so it gives invalid_key. Spaces at the start or end are ignored.
How to diagnose#
Call the account endpoint and read the HTTP status and error.code:
curl -i https://YOUR_DOMAIN/api/v1/me \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Accept-Language: en"
Use /api/company/v1/me for a company key. Then compare with the panel:
- Merchant: open Webhook and API under Integration. The first row, labelled «API للمطورين» (Arabic text meaning developer API, shown even in the English interface), lists the key masked with its first 7 and last 4 characters; the eye button shows it in full. No key means none exists.
- Company admin: open Integrations and API. The API key card shows the key (first 8 and last 4 characters when masked). The Company plan card shows the plan, its end date and which features are included, and a warning appears above the key if the plan has no API.
- Prefix: merchant keys start with
sk_and company keys withck_.
Resolution steps#
Fix a missing or invalid key
Send
Authorization: Bearer YOUR_API_KEYexactly, with the right key for the right API. Compare your stored key with the panel. If it differs, or you are unsure, renew it.Renew or generate the key
Merchants press Generate, or Renew when a key exists, in the «API للمطورين» row. Company admins press Generate API key, or Renew. Renew asks for confirmation, and the page then shows the new key in full. The old key stops working immediately, so update every system that uses it. Key generation is limited to 20 requests per minute for merchants and 10 for companies; if you exceed that, wait a minute and try again.
Fix account or plan answers
For
plan_feature, merchants open Plan and subscription to renew or upgrade; company admins renew the company subscription (subscription_expired) or ask the platform to add the API feature to the plan. Forapi_not_allowed, a merchant of a delivery company cannot use the merchant API: parcels go through the company, which may use the Company API for its merchants. Foraccount_inactive, the account must be reactivated by whoever manages it.Test again
Call
GET /meagain. A200with"success": trueconfirms the key and the plan; the same key works again once an expired plan is fixed.
- Your current API keys (shown masked)
- The name of the platform or system you connect
- Generate a new key
- Open the API documentation
Common mistakes#
- Using the wrong key type: a
ck_key on/api/v1, or a Store Syria, WooCommerce, Salla or custom-platform key, givesinvalid_key. - Forgetting to update your system after Renew.
- Copying the masked text from the table. The dots are part of it.
- Expecting
Invalid Api Key. That HTTP 400 message belongs to the mobile apps API and itsapiKeyheader; these APIs never use it.
When to contact support#
account_inactiveand you believe the account is active: ask your delivery company or the platform.- The company page says "The company has no owner admin — contact support." when you try to generate a key.
- A
500server_error: quote thereference(it starts withE).
API
GET /api/v1/meGET /api/company/v1/me