Troubleshooting
Before You Dig In
A few things to check first — these cover the majority of issues:
- Check
success, not just the HTTP status. A200 OKresponse can still be a logical error ifsuccessisfalse. Read thecodefield for the real status. - Do not switch logic on
message. The message field is human-readable and may change — only use it for display, never for conditional logic. - Retry on
503. Maintenance windows are typically brief — wait a few seconds and try again. - Handle
404gracefully. This can occur when the RSI website itself is unreachable during a live scrape.
How to Test Requests Without Writing Code
Postman is the quickest way to explore and debug API requests:
- Create a new
GETrequest. - Enter the endpoint URL, e.g.
https://api.starcitizen-api.com/v2/users/dymerz. - In the Headers tab, add
x-api-keywith your API key as the value. - Click Send.
You get the full request and response — status codes, headers, and body — without writing any code.
CORS Errors in the Browser
If you're calling the API from browser JavaScript and see a CORS error in the console, this is a browser security restriction — the server must explicitly allow cross-origin requests.
Workarounds:
- Use Postman or a REST client — not subject to browser CORS policy.
- Route requests through your own backend — make the API call server-side and forward the response to your frontend. This is the recommended approach.
- Use a browser extension — some extensions can relax CORS restrictions for development purposes only.
Keep your key off the client.
Exposing your API key in client-side JavaScript is a security risk regardless of CORS. Proxy all API calls through your own backend.
API Key Not Working
- Confirm the key is passed in the
x-api-keyheader, not as a query parameter or in the URL path. - Check for extra spaces or newline characters copied with the key.
- Log in via the site to verify your key is still active on your profile page.
- If you recently regenerated your key, make sure you are using the new one — the old key is immediately invalidated.
Data Seems Stale
The API serves data from its internal cache by default. Data stays fresh automatically via per-endpoint refresh intervals — most of the time you don't need to do anything.
If the response looks genuinely outdated, add ?refresh=true to your request to force an immediate live scrape from the RSI website. Be aware this costs 1 daily request from your quota.
For the full explanation of how the cache strategy works and when data is refreshed, see Data Freshness & Caching.
Quota Exceeded
If you receive "number of calls per day has been exceeded":
- Stop using
?refresh=truefor requests where real-time data is not strictly required — cached responses are still served and never consume quota. - Your daily quota resets at a fixed time each day. Check Rate Limits & Quota for the exact next-reset time.
- Log in and click Profile to check your remaining quota balance.
- If you consistently need a higher quota, reach out via Discord.