Fix permissions to access API