If you are encountering "Access Denied" error while using the Anchor API, it may be due to one or more of the following reasons:
Insufficient Permissions – The API key lacks the necessary permissions to create a counterparty.
Incorrect Environment – The API key is being used in the wrong environment (e.g., using sandbox keys in production).
Expired API Key – The API key has expired and is no longer valid.
Verify API Key Permission: Check if the API key has the necessary access rights to make the API request.
Confirm the Correct Environment: Ensure you are using the correct API key for the appropriate environment (sandbox vs. production).
Check API Key Expiry: If the API key is expired, generate a new one.
If you need to create a new API key, follow these steps:
Log in to the Anchor Dashboard.
Navigate to Developers > API Keys.
Click on Create API Key.
Assign necessary permissions.
Save and use the new API key in your requests.
If the issue persists, refer to the Anchor API documentation or contact support team for further assistance.