Skip to content
View in the app

A better way to browse. Learn more.

Froxlor Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Creating a new Customer via API

Featured Replies

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],
},

 

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

  • Author
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

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.