Check into the Confluence Command Line Interface.
You might be able to do it using the REST API (https://confluence.atlassian.com/plugins/servlet/restbrowser#/resource/json-rpc-confluenceservice-v2-edituser).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.