API Error Codes

Rather than trying to include this information in the API reference documentation for every Toku API, we thought it might be more helpful to provide a full list of API error codes, in a separate document.

When you need to know what happened…

Refer to the table below for a list of API error codes and their descriptions.

Code Description
0 success
-1 general error
-2 invalid server info
-101 database connection error
-102 database query error
-103 table row in-used
-200 unknown resources exception
-201 unknown get resources exception
-202 unknown put resources exception
-203 unknown post resources exception
-204 unknown update resources exception
-205 unknown option resources exception
-206 unknown delete resources exception
-210 uncaught resources exception
-211 unhandle resources exception
-212 unimplement resources exception
-300 invalid payload
-301 invalid parameter
-302 payload key missing
-303 parameter over max allowed length
-304 parameter contain restricted character
-305 parameter missing
-306 invalid length
-400 user account not in active state
-1000 invalid user ID
-1001 invalid number
-1002 number not available
-1003 number occupied
-1004 number not occupied
-1005 number not active
-1006 number price invalid
-1007 unauthorized access to this number
-1008 number not subscribed to a service
-1009 number expired
-1010 destination number not allowed
-1011 invalid destination number
-1012 number already subscribed to this service
-1013 number subscribed to other services
-1014 invalid number category
-1100 low credit balance
-1101 invalid package
-1102 invalid service ID
-1103 error deduct credit
-1200 service not found
-1201 call forward already created
-1202 call forward not created
-1203 call flow not configured
-1204 gateway url not configured
-1205 invalid callback url
-1206 invalid max call duration
-1207 invalid http method
-1208 session not found
-1209 invalid url
-1210 call session not found
-1211 invalid secret number
-1212 no route found
-1213 no available route found
-1214 no charge rate found
-1215 no route rate found
-1216 call cdr not found
-1217 call session mismatch
-1218 call route mismatch
-1219 route already confirmed
-1220 route not confirm
-1221 session closed
-1222 call already connected
-1223 call not connected
-1224 invalid charging block
-1225 invalid alert timing
-1226 subscriber not found
-1227 cdr closed
-1228 invalid otp
-1229 otp expired
-1230 recording not found
-1231 recording file not found
-1232 recording deleted
-1233 no rate found
-1301 no charge rate found
-1302 invalid charge rate
-1304 API engine error
-1305 API vendor not found
-1401 voip user group existed
-1402 voip user group has been taken
-1403 voip user group not found
-1404 voip user existed
-1405 voip user not found
-1406 invalid voip user
-1407 voip user expired
-1408 voip user name mismatch
-1409 voip user not active
-1410 voip user not terminated
-1411 voip user asigned another number as default
-2000 sms gateway not found
-2001 unable to connect sms gateway
-2002 no response from sms gateway
-2003 failed to send sms
-2004 invalid ‘From’ number
-2005 invalid ‘To’ number
-2006 message is empty
-2007 invalid date format
-3000 task not registered
-3001 task still running
-3002 task not found
-3003 task stopped, not updated
-3004 task not implemented
-3005 task completed
-3006 task created
-3007 task canceled
-3008 task paused
-3009 task restart