You said:
mode: "no-cors", //required
… this means "I am making a cross-origin request, but I am not doing anything that requires the server grant me permission with CORS so instead of throwing errors, fail silently".
You also said:
'Authorization': 'Api-Key ' + api_key,
Setting this header requires permission from CORS. Since you are in no-cors mode it automatically and silently fails to be set.
Since you didn't set the authorisation key, you get a 401 Unauthorised response from the server.
You can't use no-cors mode here, even if you have a comment saying it is required.
There is some further reading on CORS you may find useful. Note that since the service you are using requires an API key and imposes limits, it likely isn't intended for use from a browser and you should implement a server-side solution instead.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…