Skip to content

Troubleshooting & FAQ ​

Common API Errors ​

Error Code / StatusCauseSolution
401 UnauthorizedMissing, malformed, or expired tokenCheck Authorization: Bearer <token> header, or refresh token via Basalam::auth()->refreshToken(...).
403 ForbiddenThe token does not have the required OAuth scopeGo to Basalam Developer Panel or verify scopes requested in getAuthorizationUrl().
422 Unprocessable EntityRequired field missing or validation failedInspect $exception->getErrors() or $exception->getResponseBody().
invalid_clientClient ID or Client Secret incorrectVerify BASALAM_CLIENT_ID and BASALAM_CLIENT_SECRET in .env.
redirect_uri_mismatchCallback URL does not match developer panel settingsProtocol, host, port, and trailing slash must match character-by-character.
invalid_grantAuth code expired or reusedAuth codes are one-time use; initiate authorization flow again.

Network Timeouts & Retries ​

If calls to Basalam's servers occasionally encounter slow response times or transient network drops, configure automatic retries in config/basalam.php:

php
'timeout' => 45, // seconds
'retry' => [
    'times' => 3,   // retry up to 3 times
    'sleep' => 200, // sleep 200ms between attempts
],

Why are there separate URLs for Gateway and Core? ​

Basalam uses a microservice architecture:

  • https://openapi.basalam.com: High-throughput Gateway for public API endpoints (Products, Orders, Parcels, Files, Baskets).
  • https://core.basalam.com: Core vendor settings, shipping profiles, bank info, and category taxonomies.
  • https://auth.basalam.com: OAuth token issuance, refresh, and whoami inspection.
  • https://basalam.com/accounts/sso: User login & authorization screen.

The package handles all URL routing transparently.

Released under the MIT License.