In this article, we explore the common causes of a 403 error and provide guidance on how you can troubleshoot and resolve it.
Account Restrictions or Bans
Sometimes, certain account-related factors can lead to access restrictions. These may include temporary bans, rate limiting, or specific limitations imposed on your account.
The most common example is when you exceed your rate limit by spamming the API with too many requests in a given time frame - for example, if you are submitting an invalid order, or your internet connection is weak and was thus attempting too many re-connections.
Please refer to the Rate Limits page to make sure you're adhering to the requirements and be careful in the future as continued abuse will lead to increasingly more severe bans.
If you are still experiencing this type of error after 1 hour, please contact support with your IP address to resolve these restrictions or gain clarity on your account status.
Incorrect API Key Permissions
One of the most common causes of a 403 error is using an API key with insufficient permissions. API keys are often associated with specific access levels, and if your key lacks the necessary permissions for a particular action or resource, the server will deny your access. Double-check your API key's permissions on the API Keys page and ensure they align with the actions you are trying to perform. You can also refer to this page for more details on API Key Permissions.
Authentication and Authorization Issues
APIs typically employ authentication mechanisms to verify the identity of users and ensure secure access. If your authentication credentials are invalid, expired, or missing, you may encounter a 403 error. Verify that you are providing the correct credentials, such as API keys, signatures, and timestamps, and that they are properly formatted and up-to-date. Refer to Authenticating with an API Key for in-depth details on this.
Network or Server Issues
In some cases, the 403 error may be caused by temporary network or server issues. These issues might be beyond your control, but they can still result in denied access. If you suspect that the error is not on your end, you can check BitMEX Status page and Announcements to see if there are any ongoing issues.