You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Twilio Voice时触发PHP致命错误,账户无国际呼叫权限

Fixing Twilio Voice HTTP 400 Error: Account Not Authorized to Call International Numbers

Hey there, I’ve seen this exact error pop up a bunch when folks first start using Twilio for international calls—let’s break down how to fix it.

What’s Causing This?

The error message spells it out clearly: your Twilio account doesn’t have permission to call the international number you’re targeting (+126878****). Twilio locks down international calling by default for security and billing reasons, so you’ll need to manually enable access for the specific country/region you want to call.

Step-by-Step Fix

  • Log into your Twilio account dashboard
  • Head to the International Permissions section in your account settings
  • Find the country linked to the phone number you’re trying to reach (the +1268 code here corresponds to Antigua and Barbuda)
  • Toggle on the permission to make calls to that country. Quick note: If you’re on a trial account, you might need to upgrade to a paid plan or verify additional details to unlock this feature.

Your Error & Code Reference

Here’s the fatal error you ran into, formatted for clarity:

PHP Fatal error: Uncaught exception 'Twilio\Exceptions\RestException' with message '[HTTP 400] Unable to create record: Account not authorized to call +126878****. Perhaps you need to enable some international permissions: https://www.twilio.com/user/account/settings/international ' in /home/gwalioro/public_html/swifnix.com/works/call/twilio-php-master/Twilio/Version.php:85

And your code snippet (you’re already set up correctly with the Twilio PHP library):

require __DIR__ . '/twilio-php-master/Twilio/autoload.php';
use Twilio\Rest\Client;
// Your Account SID and Auth ...

One quick double-check: Once you’ve enabled the permissions, make sure your Account SID and Auth Token are correctly configured in your code—though this error is 100% permission-related, not an authentication issue.

内容的提问来源于stack exchange,提问作者Kunal Sahu

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.26 09:57:53