403/401 is returned (permissions and scopes)
Troubleshooting
403
401
Permissions
Scopes
Symptom
The authorization flow succeeds, but calling the API returns 401 or 403.
The authorization flow succeeds, but calling the API returns 401 or 403.
The difference between 401 and 403
| Code | Meaning |
|---|---|
| 401 Unauthorized | The credentials are wrong, invalid, or expired. A token problem |
| 403 Forbidden | Authentication succeeded, but there is no permission for that operation. A scope, role, or ownership problem |
Typical 401 cases and what to do
- Token expired (
expired_token) → refresh with the refresh token - Token revoked (user disconnected the integration, etc.) → re-authorization flow
- Malformed Authorization header →
Bearer(with a single space) + token - Wrong environment (using a production token in staging) → check the environment
Typical 403 cases and what to do
- Insufficient scope (
insufficient_scope) → add the required scope and re-authorize - No store access permission → check that the app is not hitting resources of a store other than the one it is connected to
- User-scope not reviewed (
app_not_approved) → apply for review (see the separate article) - Insufficient role permission → the user at connection time does not have the required role (owner, etc.)
- Plan restriction (
plan_limit_exceeded) → the store side needs to upgrade its plan
Isolation steps
- Check the
error.codeandmessagein the response - Record
X-RR-Request-Idin your logs - If 401, hit
/v1/meto check whether the token itself is valid (if it succeeds the token is fine; if you get 403 later on, it is a permission problem) - If 403, check the
scopeincluded in the current token (/v1/oauth/introspect) - If the required scope is not included, re-authorize
How to check scopes
curl -X POST https://receiptroller.io/oauth/introspect \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "token=$ACCESS_TOKEN&client_id=$CLIENT_ID&client_secret=$SECRET"
→ {
"active": true,
"scope": "store.read receipt.read",
"client_id": "...",
"exp": 1745740001
}
Related guides
Published: 2026-04-27
Updated: 2026-07-05
Category
Tags
API (22)
OAuth (15)
Android (10)
iOS (9)
Webhook (6)
Troubleshooting (5)
api (5)
App registration (4)
POS Integration (4)
Reference (4)
Related articles
-
The developer portal is not shown while on the Free planWhat to check when the ReceiptRoller developer portal is not shown. Explains what to do when your plan is Free, switching business accounts, and the timing of when the display updates.
-
Webhook is not being deliveredHow to isolate the cause when a Webhook does not reach your receiving endpoint. Walks through checking, in order, the endpoint settings, subscribed events, reachability, signature-verification failures, and firewalls.
-
app_not_approved is returned for User-scope callsWhat to check when using a User-scope results in an app_not_approved error. Explains development with a sandbox slot, applying for review, and the flow from sandbox to production.
-
Cannot obtain a token (authentication error)How to isolate the cause when you cannot obtain an access token. Explains the representative errors — invalid_client, invalid_grant, redirect_uri_mismatch — and what to do about them.