Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Jonjie's avatar
Level 12

Twilio PHP Fax issue: [HTTP 403] Unable to create record

Whenever I tried to use my test credentials for Fax, it throws an error:

Error

[HTTP 403] Unable to create record: Resource not accessible with Test Account Credentials

Code

public function send()
{
    $sid    = env('TWILIO_ACCOUNT_SID');
    $token  = env('TWILIO_AUTH_TOKEN');
    $to = env('TO_EXAMPLE');
    $twilio = new Client($sid, $token);
    $mediaURL = asset('pdfs/dummy.pdf');
    $from = ["from" => '+' . env('TWILIO_NUMBER')];

    $fax = $twilio->fax->v1->faxes
        ->create('+' . $to, $mediaURL, $from);

    print($fax->sid);
}

0 likes
4 replies
Jonjie's avatar
Level 12

@sinnbeck Oh no, so I can't test now. Thanks for your response. Btw, Do you have any options so I can integrate fax for my laravel app?

Edit:

When I try my live credentials, it returns different error:

[HTTP 403] Unable to create record: '+15005550006' is not a valid destination for trial accounts

Please or to participate in this conversation.