Handling API 403 Forbidden Errors
If the plugin encounters a 403 Forbidden error while fetching data, it typically means your access to the Stratz API has been temporarily restricted for violating its security policies.
Possible Causes
Recently, Stratz has tightened its API access policies to ensure fair use and service stability. A 403 error is usually triggered by one of the following scenarios:
Multiple IPs, Single Token: The same API Token was used to send requests from multiple different IP addresses in a short period.
Single IP, Multiple Tokens: The same IP address was used to send requests with multiple different API Tokens in a short period.
This often occurs if you have configured the dota2tracker plugin or other Stratz-powered tools on multiple devices (e.g., home computer, work computer, server).
Solutions
You can choose one of the following solutions to resolve the restriction:
Solution 1: Wait
Stop all applications that use your Stratz API token (including this plugin) and wait for the restriction to be lifted automatically.
Based on current testing, the ban duration is typically 1 hour. Please note that this policy may change in the future.
Solution 2: Refresh Your Token
- This method can lift the restriction immediately, but you must update the old token with the new one everywhere it is used.
Go to the Stratz website and log out of your account.
Log back in using your Steam account.
Visit the Stratz API Page to get your new token.
Replace the old token with the new one in the Koishi plugin configuration.
Refer to the discussion issues/10 (Discussion in Chinese)