Home > Mobile >  how to call http api in roundcube mail client to change password?
how to call http api in roundcube mail client to change password?

Time:12-15

I wish to call http api to change password in roundcube mail client using python code. How can this be done? Where is the exact location in the roundcube configuration and how is it invoked?

CodePudding user response:

  1. Ensure the httpapi is available in your install

  2. In the main roundcube configuration file config.inc.php set the variables: $config['password_httpapi_url'] =

    'http://host:5000/change_user_password'; // required $config['password_httpapi_method'] = 'GET'; // default $config['password_httpapi_var_user'] = 'username'; // optional $config['password_httpapi_var_curpass'] = 'curpass'; // optional $config['password_httpapi_var_newpass'] = 'newpass'; // optional

Important NOTE: If you use the GET method you can pass the variables as parameters using query string values eg. the request.args.get('username')

If you use the POST method you need to use the form fields. eg. request.form['username']

  1. Pass the http api driver name in plugins/password/config.inc.php: $config['password_driver'] = 'httpapi';

  2. Reload the web server.

  • Related