Exit Codes
The Vonage CLI returns an exit code to indicate if the command succeeded or triggered an error. Every command will return 0 if successful, but the meaning of other codes varies by command.
The following tables list the exit codes for each command.
vonage apps create
Command: vonage apps create <name>
| Code | Description |
|---|---|
| 0 | Success |
vonage apps list
Command: vonage apps list
| Code | Description |
|---|---|
| 0 | Success |
vonage apps show
Command: vonage apps show <id>
| Code | Description |
|---|---|
| 0 | Success |
| 99 | Application not found |
vonage apps update
Command: vonage apps update <id>
| Code | Description |
|---|---|
| 0 | Success |
vonage apps delete
Command: vonage apps delete <id>
| Code | Description |
|---|---|
| 0 | Success |
vonage apps capabilities
Command: vonage apps capabilities <action>
| Code | Description |
|---|---|
| 0 | Success |
| 1 | When setting a flag that does not belong to that capability, or modifying a capability but missing a flag |
vonage apps numbers
Command: vonage apps numbers <command>
| Code | Description |
|---|---|
| 0 | Success |
| 55 | When trying to unlink a number that is not linked to the application |
| 99 | When trying to link a number the user does not own |
vonage apps numbers list
Command: vonage apps numbers list <id>
| Code | Description |
|---|---|
| 0 | Success |
| 1 | When numbers are linked, but the application does not have messages or capabilities and the --fail flag is passed |
vonage auth set
Command: vonage auth set
| Code | Description |
|---|---|
| 0 | Success |
| 20 | When trying to write the config file fails (Either a permission issue or when the user rejects overwriting an existing file) |
vonage auth check
Command: vonage auth check
| Code | Description |
|---|---|
| 0 | Success |
| 5 | When authentication fails (either secret and key or app ID and private key) |
| 20 | When passing in a private key file that does not exist |
| 99 | When passing in a private key file that is not a private key (does not start with -----BEGIN PRIVATE KEY-----) |
vonage auth show
Command: vonage auth show
| Code | Description |
|---|---|
| 0 | Success |
| 17 | Error: global config directory does not exist |
| 20 | Error: config file is not found |
vonage balance
Command: vonage balance
| Code | Description |
|---|---|
| 0 | Success |
vonage jwt create
Command: vonage jwt create
| Code | Description |
|---|---|
| 0 | Success |
| 20 | Config file is not found |
vonage jwt validate
Command: vonage jwt validate <token>
| Code | Description |
|---|---|
| 0 | Success |
| 2 | No configuration found |
| 22 | ACL, Sub or AppId claims do not match |
| 127 | The token has expired or is inactive (time for the NBF claim has not happened yet). |
| 128 | The private key for the token is invalid. |
vonage numbers buy
Command: vonage numbers buy <country> <msisdn>
| Code | Description |
|---|---|
| 0 | Success |
| 44 | Number is no longer available for purchase |
| 99 | Failed to purchase number |
vonage numbers cancel
Command: vonage numbers cancel <country> <msisdn>
| Code | Description |
|---|---|
| 0 | Success |
| 99 | If there is no active subscription for that number |
vonage numbers list
Command: vonage numbers list
| Code | Description |
|---|---|
| 0 | Success |
vonage numbers search
Command: vonage numbers search <country>
| Code | Description |
|---|---|
| 0 | Success |