rhufsky Posted March 6 Share Posted March 6 I try to create a new customer via the API. I succeed in creating the customer and a standard domain. What I was not able to find out: - How can I tell the API to generate the default index.html - How can I tell the API to generate the default ftp account - How can I tell the API to send the login data to the customer (send password via mail) - I guess I have to send the hashed Password so how do I hash the password? What I tried is: command: "Customers.add", params: { new_loginname: "acustomer", email: "me@gmail.com", firstname: "Api", name: "Tester", password: "Generalissimss!1!", company: "The Mighty Conpany", adminid: 1, gender: 1, street: "Plamps Drive 5", zipcode: "122345", city: "Somewhere", phone: "", fax: "", customernumber: "", def_language: "de", diskspace: 40960, diskspace_used: 628, mysqls: 4, ftps: 1, subdomains: 0, traffic: 10485760, phpenabled: 1, pop3: 0, imap: 0, perlenabled: 1, dnsenabled: 0, theme: "Froxlor_dark", custom_notes: "", allowed_phpconfigs: [1], logviewenabled: 1, allowed_mysqlserver: [0], }, Link to comment Share on other sites More sharing options...
0 d00p Posted March 6 Share Posted March 6 1 minute ago, rhufsky said: How can I tell the API to generate the default index.html Parameter: store_defaultindex (bool) 2 minutes ago, rhufsky said: How can I tell the API to send the login data to the customer (send password via mail) Parameter: sendpassword (bool) 3 minutes ago, rhufsky said: I guess I have to send the hashed Password so how do I hash the password? You pass the plaintext password as froxlor hashes it according to the settings (and it's needed in plaintext to add the default ftp-user etc. internally or to send the password to the customer if the parameter 'sendpassword' is set to true) See: https://docs.froxlor.org/latest/api-guide/commands/customers.html#customers-add Link to comment Share on other sites More sharing options...
0 rhufsky Posted March 6 Author Share Posted March 6 11 minutes ago, d00p said: Parameter: store_defaultindex (bool) Parameter: sendpassword (bool) You pass the plaintext password as froxlor hashes it according to the settings (and it's needed in plaintext to add the default ftp-user etc. internally or to send the password to the customer if the parameter 'sendpassword' is set to true) See: https://docs.froxlor.org/latest/api-guide/commands/customers.html#customers-add OK thanks Link to comment Share on other sites More sharing options...
Question
rhufsky
I try to create a new customer via the API. I succeed in creating the customer and a standard domain. What I was not able to find out:
- How can I tell the API to generate the default index.html
- How can I tell the API to generate the default ftp account
- How can I tell the API to send the login data to the customer (send password via mail)
- I guess I have to send the hashed Password so how do I hash the password?
What I tried is:
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now