简体   繁体   中英

send fax using twilio api php

I am working on Twilio APIs and trying to send fax using Programmable fax but i am getting this error.

[HTTP 403] Unable to create record: Dialing to this country is not permitted by your account's international permissionsRequest done

Below is my code to send fax.

    $sid = config('services.twilio.sid');
    $token = config('services.twilio.token');

    $client = new Client($sid, $token);
    try {
        $fax = $client->fax->v1->faxes->create(
            "+92304xxxxxxx", // to
            "https://www.twilio.com/docs/documents/25/justthefaxmaam.pdf", // mediaUrl
            array("from" => config('services.twilio.phone_number') )
        );
    } 

Anybody please help?

Thank you.

Twilio developer evangelist here.

Have you ensured that the country you are trying to send the fax to is selected on your geographic permissions for voice calls ? Fax is sent over the voice channel not the messaging channel, so even if you can send SMS messages to the country, you may not have given permission for voice/fax yet.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM