Most API calls require authentication. Phaxio supports two methods of authentication: HTTP authentication and parameter authentication. We recommend HTTP authentication. The client libraries have built-in authentication handling, which will automatically authenticate each request when properly initialized.

HTTP Authentication

HTTP authentication may be used simply by using the API key as the username and the API secret as the password. For example:

curl '' \

$faxId = '123';

use Phaxio\Phaxio;
$phaxio = new Phaxio('API_KEY', 'API_SECRET', '');

Parameter Authentication

If you are unable to use HTTP authentication, you may also authenticate by using api_key and api_secret parameters. These parameters can be put in the request body just like a form field parameter. For example:

curl '' \
  -F 'api_key=API_KEY' -F 'api_secret=API_SECRET'

Or for request’s without a message body (such as GET), the authentication parameters can be included in the query string. For example:

curl ''