MOR API registration
From Kolmisoft Wiki
Jump to navigationJump to search
This functionality is available from MOR 10
Create new user from params.
- Call: /api/registration
- Methods: POST, GET(if allowed, not recomended)
- Params:
- id - User UNIQUEHASH in MOR database. Required.
- username - New user username. Required.
- password - New user password. Required.
- password2 - New user password confirmation. Required.
- first_name - New user password confirmation. Required.
- last_name - New user password confirmation. Required.
- country_id - New user password confirmation. Required.
- email - New user password confirmation. Required.
- device_type - Device type [SIP, IAX2]. Required.
- mob_phone - Mobile phone number.
- phone - Phone number.
- fax - Fax.
- client_id - Company/Personal ID.
- vat_number - TAX Registration Number.
- state
- county
- city
- postcode - Postcode/ZIP.
- address
- Returns:
- Susscess
- <status>Registration succesful</status>
- user_device_settings
- <email>Registration email</email> - If email sending enabled.
- <device_type>device type</device_type> - [SIP|IAX2]
- <username>device username</username>
- <password>device password</password>
- <pin>device pin</pin>
- <server_ip>Asterisk Server IP</server_ip>
- <registration_notice>Registration_notice</registration_notice> - Registration_notice set in Settings
- Susscess
- Errors:
- <error>User was not found</error> - User was not found using user_id. Use correct user_id.
- <error>Incorrect hash</error> - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
- <error>Registration over API is disabled</error> - Setting: Settings->API->API allow Registration, is off. Turn on API allow Registration.
- <error>Dont be so smart</error> - User with UNIQUEHASH not found or params id not send. Enter correct id.
- <error>Please enter username</error> - Params username is not send. Enter correct username.
- <error>Enter device type</error> - device_type is not send. Enter correct device_type.
- <error>Such username is already taken</error> - Duplicate of username. Change username.
- <error>Passwords do not match</error> - Enter correct passwords.
- <error>Password is too shorth</error> - Enter correct password.
- <error>Please enter first name</error> - Enter first_name.
- <error>Please enter last name</error> - Enter last_name.
- <error>Please select country</error> - Enter country_id.
- <error>Please enter email</error> - Email address is not valid or not send. Enter correct email.
- <error>This email address is already in use</error> - Change email address.
- <error>User with mobile phone already exists</error> - Change mobile phone.
- <error>User with phone already exists</error> - Change phone.
- <error>User with fax already exists</error> - Change fax.
- Errors: