Handling API Responses

Learn how to manage both successful and failed responses from the API.

The Visla Open API always returns a 200 HTTP status to indicate a successful connection. The code field in the API response determines the operation's status: 0 indicates success, and any other value indicates an error or exception. The code ranges from 0 to 23XXX, with 0 representing success, and values outside this range signifying different types of errors or exceptions. In case of success, the data property contains the expected results. For errors, the msg property provides a description of the issue.

Success Response Example

{
  "code": 0,
  "msg": "SUCCESS",
  "trackingId": "",
  "data": {}
}

Failure Response Example

{
  "code": 31010,
  "msg": "duplicate request",
  "trackingId": ""
}

Common Error Codes

CodeMessageDescriptionCategory
0SUCCESSRequest successfulSuccess
1000Unknown errorInternal server errorUnknown
2000Request method is not allowedHTTP method not supportedMethod Not Allowed
2100This api is not supported any more or deprecatedAPI deprecatedMethod Not Allowed
3000Invalid request parametersRequest parameters are invalidInvalid Arguments
3003Missing required parametersRequired parameters not providedInvalid Arguments
3004Missing tokenAuthentication token missingInvalid Arguments
3005Invalid tokenAuthentication token invalidInvalid Arguments
3006Invalid email formatEmail format is incorrectInvalid Arguments
3008Expired tokenAuthentication token expiredInvalid Arguments
3009Invalid S3 URL formatS3 URL format is incorrectInvalid Arguments
3010Unsupported this file suffix, we just supported .File format not supportedInvalid Arguments
3020Unable to process project.Project processing failedInvalid Arguments
3042We have not yet finished processing your assets.Asset processing in progressInvalid Arguments
3043We encountered an error while processing the asset. Please try adding it again.Asset processing failedInvalid Arguments
3049You've exceeded our system limit of 200 pages across PDFs, PPTs, and images. Please reduce the number of pages or images and try again.File size/page limit exceededInvalid Arguments
4004Project is not foundProject does not existNot Found
4009Project asset is not foundAsset does not existNot Found
4060The agent project media is not found.Media not found in projectNot Found
4063The agent project document is not found.Document not found in projectNot Found
4600Agent Project is not foundAgent project does not existNot Found
6000Your account has been suspended.Account disabledPermission Denied
6001Your account has not been activated. Please check the activation email in your inboxAccount not activatedPermission Denied
6002Access deniedInsufficient permissionsPermission Denied
6025You have a video being generated, please wait until the video generation process completes.Generation in progress limitPermission Denied
6050Your account has run out of credits and is now locked. To resume tasks, please purchase additional credits or wait for the next billing cycle for your credits to refresh.Insufficient creditsPermission Denied
6052Insufficient credits to use this feature. Please purchase additional credits to continue.Feature requires creditsPermission Denied
6200This feature is not supported by your plan, please upgrade your plan to use itPlan limitationPermission Denied
6401Open API access is not available: Your workspace is not on a paid plan. Please upgrade to a paid plan or contact your administrator for more details.OpenAPI access deniedPermission Denied
7000Your username or password is incorrectAuthentication failedUnauthenticated
7004Your access token was already revoked, please sign in again to refresh the tokenToken revokedUnauthenticated
14000Internal server errorServer internal errorInternal Error
15000Visla is currently undergoing maintenance. Please try again later.Service maintenanceService Unavailable
17001API requests are too frequent, please try again laterRate limit exceededRate Limited
17002API requests are too frequent, please try again laterIP rate limit exceededRate Limited
23000Storage failedAWS S3 failureThird Party Error
23004Video editing server errorVideo processing failureThird Party Error
31001apikey is requiredAPI key missingOpenAPI Error
31002apikey is invalidAPI key invalidOpenAPI Error
31003apikey not existsAPI key not foundOpenAPI Error
31005sign is invalidSignature invalidOpenAPI Error
31006ts is invalidTimestamp invalidOpenAPI Error
31010duplicate requestRequest already processedOpenAPI Error
31020required param missedRequired parameter missingOpenAPI Error
31021The apikey does not have permission to access this resourceAPI key permission deniedOpenAPI Error
31030client ip is not in the allow listIP not whitelistedOpenAPI Error