Fixed security issue - access to API (issue #1814)