Difference between revisions of "MOR API user register"

From Kolmisoft Wiki
Jump to navigationJump to search
Line 14: Line 14:
* Params:
* Params:
** id - User UNIQUEHASH in MOR database. '''Required'''. <u>If uniquehash is not used, user will end up at admin account</u>.
** id - User UNIQUEHASH in MOR database. '''Required'''. <u>If uniquehash is not used, user will end up at admin account</u>.
Uniquehash can be found after loggin out of MOR in the address field of the browser,
for example http://SERVERIP/billing/callc/login/kljsdfg54kl where kljsdfg54kl is the uniquehash.
** username - New user username. '''Required'''.
** username - New user username. '''Required'''.
** password - New user password. '''Required'''.
** password - New user password. '''Required'''.

Revision as of 12:49, 2 March 2012

This functionality is available from MOR 10


MOR API

Create new user from params.






  • Call: /api/user_register
  • Methods: POST, GET(if allowed, not recomended)
  • Params:
    • id - User UNIQUEHASH in MOR database. Required. If uniquehash is not used, user will end up at admin account.

Uniquehash can be found after loggin out of MOR in the address field of the browser, for example http://SERVERIP/billing/callc/login/kljsdfg54kl where kljsdfg54kl is the uniquehash.

    • username - New user username. Required.
    • password - New user password. Required.
    • password2 - New user password confirmation. Required.
    • first_name - New user first name. Required.
    • last_name - New user last name. Required.
    • country_id - New user country. Required.
    • email - New user email. 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:
    • Success
      • <status>Registration successful</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
    • Errors:
      • <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.