M4 API user create

From Kolmisoft Wiki
Revision as of 08:17, 8 March 2024 by Dmitrij (talk | contribs) (→‎Usage)
Jump to navigationJump to search

Description

M4 API Create a new user from params.

Usage

  • Call: /api/user_create
  • Methods: POST, GET(if allowed, not recomended)



Parameters

Parameters which are included into hash:

  • u - username for authentication. Required.
  • username - New user username. Required.
  • password - New user password. Required.
  • first_name - New user first name.
  • last_name - New user last name.
  • state

Parameters which are not included into hash:

  • u - username for authentication. Required.
  • main_email - New user main email.
  • call_limit - Call limit (how many simultaneous Calls the new User can make by default?)
  • currency_id - Currency ID from database.
  • country_id - New user country (please check table below).
  • mob_phone - Mobile phone number.
  • phone - Phone number.
  • fax - Fax.
  • client_id - Company/Personal ID.
  • vat_number - TAX Registration Number.
  • county
  • city
  • postcode - Postcode/ZIP.
  • address
  • accounting_number - Accounting Number



Request

HTML POST: http://<SERVER_IP>/billing/api/user_create?u=admin&username=user_one&password=Str0ngP@ss&test=1


User will be created according to used params and default User settings.

Returns

Success

<page>
   <status>
       <success>User was created successfully</success>
   <user>
       <user_id>x</user_id>
       <username>user_one</username>
   </user>
   </status>
</page>

Errors

  • Username has already been taken
  • Password must be longer than x characters
  • Username must be longer than x characters
  • Password must contain at least one numeric value, capital and lowercase symbol



List of Country IDs

1 - Afghanistan

2 - Albania

3 - Algeria

4 - American Samoa

5 - Andorra

6 - Angola

7 - Anguilla

8 - Antarctica

9 - Antigua And Barbuda

10 - Argentina

11 - Armenia

12 - Aruba

13 - Australia

14 - Austria

15 - Azerbaijan

16 - Bahamas

17 - Bahrain

18 - Bangladesh

19 - Barbados

20 - Belarus

21 - Belgium

22 - Belize

23 - Benin

24 - Bermuda

25 - Bhutan

26 - Bolivia

27 - Bosnia And Herzegovina

28 - Botswana

30 - Brazil

32 - Brunei Darussalam

33 - Bulgaria

34 - Burkina Faso

35 - Burundi

36 - Cambodia

37 - Cameroon

38 - Canada

39 - Cape Verde

40 - Cayman Islands

41 - Central African Republic

42 - Chad

43 - Chile

44 - China

45 - Christmas Island

46 - Cocos (Keeling) Islands

47 - Colombia

48 - Comoros

49 - Congo

50 - Congo, The Democratic Republic Of The

51 - Cook Islands

52 - Costa Rica

53 - Ivory Cost

54 - Croatia

55 - Cuba

56 - Cyprus

57 - Czech Republic

58 - Denmark

59 - Djibouti

60 - Dominica

61 - Dominican Republic

62 - Ecuador

63 - Egypt

64 - El Salvador

65 - Equatorial Guinea

66 - Eritrea

67 - Estonia

68 - Ethiopia

69 - Falkland Islands (Malvinas)

70 - Faroe Islands

71 - Fiji

72 - Finland

73 - France

74 - French Guiana

75 - French Polynesia

77 - Gabon

78 - Gambia

79 - Georgia

80 - Germany

81 - Ghana

82 - Gibraltar

83 - Greece

84 - Greenland

85 - Grenada

86 - Guadeloupe

87 - Guam

88 - Guatemala

89 - Guinea

90 - Guinea-Bissau

91 - Guyana

92 - Haiti

94 - Vatican City

95 - Honduras

96 - Hong Kong

97 - Hungary

98 - Iceland

99 - India

100 - Indonesia

101 - Iran

102 - Iraq

103 - Ireland

104 - Israel

105 - Italy

106 - Jamaica

107 - Japan

108 - Jordan

109 - Kazakhstan

110 - Kenya

111 - Kiribati

112 - Korea, Democratic People's Republic Of

113 - Korea, Republic of

114 - Kuwait

115 - Kyrgyzstan

116 - Laos

117 - Latvia

118 - Lebanon

119 - Lesotho

120 - Liberia

121 - Libyan Arab Jamahiriya

122 - Liechtenstein

123 - Lithuania

124 - Luxembourg

125 - Macao

126 - Macedonia

127 - Madagascar

128 - Malawi

129 - Malaysia

130 - Maldives

131 - Mali

132 - Malta

133 - Marshall islands

134 - Martinique

135 - Mauritania

136 - Mauritius

137 - Mayotte

138 - Mexico

139 - Micronesia

140 - Moldova

141 - Monaco

142 - Mongolia

143 - Montserrat

144 - Morocco

145 - Mozambique

146 - Myanmar

147 - Namibia

148 - Nauru

149 - Nepal

150 - Netherlands

151 - Netherlands Antilles

152 - New Caledonia

153 - New Zealand

154 - Nicaragua

155 - Niger

156 - Nigeria

157 - Niue

158 - Norfolk Island

159 - Northern Mariana Islands

160 - Norway

161 - Oman

162 - Pakistan

163 - Palau

164 - Palestine

165 - Panama

166 - Papua New Guinea

167 - Paraguay

168 - Peru

169 - Philippines

171 - Poland

172 - Portugal

173 - Puerto Rico

174 - Qatar

175 - Reunion

176 - Romania

177 - Russian Federation

178 - Rwanda

179 - Saint Helena

180 - Saint Kitts And Nevis

181 - Saint Lucia

182 - Saint Pierre And Miquelon

183 - Saint Vincent And The Grenadines

184 - Samoa

185 - San Marino

186 - Sao Tome And Principe

187 - Saudi Arabia

188 - Senegal

189 - Seychelles

190 - Sierra Leone

191 - Singapore

192 - Slovakia

193 - Slovenia

194 - Solomon Islands

195 - Somalia

196 - South Africa

198 - Spain

199 - Sri Lanka

200 - Sudan

201 - Suriname

203 - Swaziland

204 - Sweden

205 - Switzerland

206 - Syrian Arab Republic

207 - Taiwan

208 - Tajikistan

209 - Tanzania

210 - Thailand

212 - Togo

213 - Tokelau

214 - Tonga

215 - Trinidad And Tobago

216 - Tunisia

217 - Turkey

218 - Turkmenistan

219 - Turks And Caicos Islands

220 - Tuvalu

221 - Uganda

222 - Ukraine

223 - United Arab Emirates

224 - United Kingdom

225 - United States

227 - Uruguay

228 - Uzbekistan

229 - Vanuatu

230 - Venezuela

231 - Vietnam

232 - Virgin Islands, British

233 - Virgin Islands, U.S.

234 - Wallis And Futuna

236 - Yemen

238 - Zambia

239 - Zimbabwe

240 - Ascension Island

241 - Diego Garcia

242 - Inmarsat

243 - East Timor

246 - Iridium

247 - Serbia and Montenegro

250 - Emsat

251 - Ellipso-3

252 - Globalstar

253 - Montenegro

254 - Kosovo

255 - South Sudan

256 - Thuraya



M4 directions id.png

See also