Connect. Communicate. Collaborate. Securely.

Home » Kerio User Forums » Kerio Control » Kerio control php api does not work with new version (9) (php api)
  •  
IRGHoST

Messages: 7

Karma: 0
Send a private message to this user
hi all
i got this error while im running my custom php code that uses kerio php api
"Message: Invalid value for OptionalStringList.value"
anybody knows why i got this error?
  •  
Petr Dobry (Kerio)

Messages: 782
Karma: 61
Send a private message to this user
We would need more details. Like what API call are you trying to make ? How is the JSON look like ?

Petr Dobry
Product Development Manager | Kerio
  •  
IRGHoST

Messages: 7

Karma: 0
Send a private message to this user
i use kerio control php api ver 1.3
  •  
Petr Dobry (Kerio)

Messages: 782
Karma: 61
Send a private message to this user
That does not provide answers to the questions above.
We need to see what API call you're trying to make and what parameters you pass in that call.

Petr Dobry
Product Development Manager | Kerio
  •  
IRGHoST

Messages: 7

Karma: 0
Send a private message to this user
							$newUser = array(
							'credentials' => array(
								'userName' => strtolower($acusr['username']),
								'password' => $acusr['password'],
								'passwordChanged' => true
						),
						'fullName' => 'KerioRadius',
						'description' => $acusr['password'],
						'email' => '',
						'authType' => 'Internal',
						'useTemplate' => true,
						'adEnabled' => true,
						'localEnabled' => true,
						'groups' => array(),
						'autoLogin' => array(
								'firewall' => false,
								'addresses' => array(
										'enabled' => false,
										'value' => null
								),
								'addressGroup' => array(
										'enabled' => false,
										'id' => null
								)
						),
						'vpnAddress' => array(
								'enabled' => false,
								'value' => null
						),
						'data' => array(
								'rights' => array(
										'readConfig' => false,
										'writeConfig' => false,
										'overrideWwwFilter' => false,
										'unlockRule' => false,
										'dialRasConnection' => false,
										'connectVpn' => true,
										'connectSslVpn' => true,
										'useP2p' => false
								),
								'quota' => array(
										'daily' => array(
												'enabled' => false,
												'type' => 'QuotaBoth',
												'limit' => array(
														'value' => 0,
														'units' => 'GigaBytes'
												)
										),
										'weekly' => array(
												'enabled' => false,
												'type' => 'QuotaBoth',
												'limit' => array(
														'value' => 0,
														'units' => 'GigaBytes'
												)
										),
										'monthly' => array(
												'enabled' => false,
												'type' => 'QuotaBoth',
												'limit' => array(
														'value' => 0,
														'units' => 'GigaBytes'
												)
										),
										'blockTraffic' => false,
										'notifyUser' => false
								),
								'wwwFilter' => array(
										'javaApplet' => false,
										'embedObject' => false,
										'script' => false,
										'popup' => false,
										'referer' => false
								),
								'language' => 'detect'
							)
						);
  •  
Petr Dobry (Kerio)

Messages: 782
Karma: 61
Send a private message to this user

You're missing one argument:
"macAddresses":{"enabled":false,"value":[""]}}

I think that addresses value should be passed as an empty array instead of null.

"addresses":{"enabled":false,"value":[""]}

Petr Dobry
Product Development Manager | Kerio
  •  
IRGHoST

Messages: 7

Karma: 0
Send a private message to this user
i found the solution before u answer this topic
in older ver i use null for value but in this ver i use array() for empty value
and its working for me

[Updated on: Thu, 31 December 2015 11:17]

Previous Topic: multihoming
Next Topic: Kerio Control Administration Access through Internet
Goto Forum:
  


Disclaimer:
Kerio discussion forums are intended for open communication between forum members and may contain information and material posted by members which may be useful in learning about Kerio products. The discussion forums are not intended to provide technical support for any specific product. Any information implied or expressed in the discussion forums is that of the posting member. Kerio is in no way responsible for the information posted in the forums, or its accuracy. Kerio employees may participate in the discussions, but their postings do not represent an offical position of the company on any issues raised or discussed. Kerio reserves the right to monitor and maintain the forums to promote free and accurate exchange of information.

Current Time: Sat Nov 18 11:32:20 CET 2017

Total time taken to generate the page: 0.00448 seconds
.:: Contact :: Home ::.
Powered by: FUDforum 3.0.4.