Authentication Errors
”Unauthorized” (401)
- Invalid or expired API key
- API key not configured
- Using wrong profile
-
Verify your API key is correct:
-
Re-run setup if needed:
-
Check if environment variable is overriding config:
- Verify the key in the Telnyx Portal
”No configuration found”
Permission Errors
”Forbidden” (403)
- API key doesn’t have permission for this action
- Resource belongs to a different account
- Account verification required
- Check API key permissions in the Portal
- Verify you’re using the correct profile:
- Some features require account verification (verify here)
Resource Errors
”Not Found” (404)
- Resource ID is incorrect
- Resource was deleted
- Resource belongs to a different account
-
Verify the resource exists:
- Check for typos in the resource ID
- Ensure you’re using the correct profile if you have multiple accounts
”Phone number not found”
Rate Limiting
”Too Many Requests” (429)
- Exceeded API rate limits
- Too many requests in short period
-
Add delays between requests in scripts:
- Use bulk endpoints when available
- Check rate limits documentation
Messaging Errors
”Number not enabled for messaging”
-
Enable messaging on the number:
-
Or purchase a messaging-enabled number:
“10DLC campaign required”
”Invalid ‘to’ number”
-
Use E.164 format (include country code):
-
Verify the number is valid:
Installation Issues
”command not found: telnyx”
Causes:- CLI not installed
- Not in PATH
- Shell not reloaded after install
-
Verify installation:
-
Reinstall if needed:
-
Check npm global bin is in PATH:
-
Restart your terminal or reload shell config:
Node.js version error
Permission denied during install
- Fix npm permissions (npm guide)
- Or use a Node version manager (nvm, fnm) which doesn’t require sudo
Connection Issues
”Network error” / “ECONNREFUSED”
- No internet connection
- Firewall blocking requests
- Proxy misconfiguration
- Check internet connectivity
- Verify you can reach the API:
- Check proxy settings if applicable
Timeout errors
- Check your internet connection
- Try again (may be temporary)
- For large operations, the API may need more time
JSON Parsing Errors
”Unexpected token in JSON”
- API returned HTML error page instead of JSON
- Authentication issue returning login page
Getting More Help
Enable Debug Mode
For detailed request/response logging:Check CLI Version
Ensure you’re on the latest version:Get Support
- GitHub Issues: Report bugs
- Telnyx Support: Contact support
- Community: Slack
- API Status: status.telnyx.com