@wilson_cheng , Then check the API key and parameters. 401 error is occurs due to authentication fault, so ypu have to check the Api key. Otherwise try your api key in postman website test your API works or not. Kindly conform your api Working condition.
And Also happens due to firewall security and DNS.