I am writing code for testing API:Upload such that the file to be uploaded if at some URL. I am testing code using https://test.wikipedia.org/w/api.php test API, but for most of the urls I am getting the following error.
{‘servedby’: ‘mw1224’, ‘error’: {‘code’: ‘copyuploadbaddomain’, ‘info’: ‘Uploads by URL are not allowed from this domain.’, ‘*’: ‘See https://test.wikipedia.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes.’}}
and for some urls I am getting the following error-
{‘servedby’: ‘mw1315’, ‘error’: {‘info’: ‘This action has been automatically identified as harmful, and therefore disallowed. If you believe your action was constructive, please inform an administrator of what you were trying to do. A brief description of the abuse rule which your action matched is: 0 copyvios’, ‘code’: ‘abusefilter-disallowed’, ‘abusefilter’: {‘id’: 162, ‘description’: ‘0 copyvios’, ‘actions’: [‘disallow’]}, ‘*’: ‘See https://test.wikipedia.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes.’, ‘warning’: ‘This action has been automatically identified as harmful, and therefore disallowed.\nIf you believe your action was constructive, please inform an administrator of what you were trying to do.\nA brief description of the abuse rule which your action matched is: 0 copyvios’, ‘message’: {‘key’: ‘abusefilter-disallowed’, ‘params’: [‘0 copyvios’, 162]}, ‘filekey’: ‘16g1tlns6obo.3k7abc.42588.’, ‘sessionkey’: ‘16g1tlns6obo.3k7abc.42588.’}}
How to solve this problem?