This error usually occurs when the authorized redirect URI used with the Baidu API does not match the redirect URI you have configured in your app management settings.
Please check the following aspects for any discrepancies:
- Verify whether the callback URL configured in App Management matches the callback URL used in your code.
- Verify that your callback URL is correct. The callback URL must be a valid domain name or IP address for your application.
- Check whether your callback URL contains the http:// or https:// prefix; if it does, ensure that it matches the callback URL you have configured in the Application Management section.
- If your application is running in a local development environment, you need to configure a local callback URL in Application Management and use this local callback URL in your code.
If you are still unable to resolve this issue, please check whether your authorization process is correctly implemented in accordance with the Baidu API requirements, or contact Baidu API technical support for further assistance.