How to populate the Text Plugin from command line or API

This is the classic Cross Origin error (see CORS. When running localhost on different ports, the browser sees community.grafana.com and localhost:18081 as different domains and therefore blocks the request as a security feature.

If you are just testing locally, you can turn off CORS with this Chrome plugin. Just remember to disable it when you are finished testing as it will break other sites (like GitHub for example).

If you intend to have this on server with a domain then this will not be a problem. For example, http://myhost:3000 and http://myhost:18081 are seen as the same domain by the browser. Localhost is a special case.

Otherwise, the long term solution is to add a Access-Control-Allow-Origin header as the error says. I have no idea what application you have on port 18081 but most web frameworks support adding headers.