/** * Example below uses Apache HTTP Client 4 with Fluent API **/Map<String, String> pathParams = new HashMap<>();pathParams.put("user_id", "'13d8z73c'");StrSubstitutor sub = new StrSubstitutor(values, "{", "}");String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}/outbox");String jsonBody = ...; // See request body exampleString result = Request .Post(url) // The x-fax-clientid header is required only when using the OAuth2 token scheme .addHeader("x-fax-clientid", "YOUR CLIENT_ID") .addHeader("Content-Type", "'application/json'") .addHeader("Accept", "'application/json'") .addHeader("Authorization", "'Bearer {access-token}'") .bodyString(jsonBody, "application/json") .execute() .returnContent().asString();System.out.println(result.toString());
package mainimport ( "bytes" "net/http")func main() { headers := map[string][]string{ // The x-fax-clientid header is required only when using the OAuth2 token scheme "Content-Type": []string{"application/json"}, "Accept": []string{"application/json"}, "Authorization": []string{"Bearer {access-token}"}, "x-fax-clientid": []string{"YOUR CLIENT_ID"} } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("POST", "https://restapi.fax.plus/v3/accounts/{user_id}/outbox", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ...}
<?phprequire 'vendor/autoload.php';$headers = array( 'Accept' => 'application/json', 'Authorization' => 'Bearer {access-token}', // The x-fax-clientid header is required only when using the OAuth2 token scheme 'x-fax-clientid' => '{client ID}',);$client = new GuzzleHttp\Client();// Define array of request body.$request_body = ...; // See request body exampletry { $response = $client->request('POST','https://restapi.fax.plus/v3/accounts/{user_id}/outbox', array( 'headers' => $headers, 'json' => $request_body, ) ); print_r($response->getBody()->getContents()); } catch (GuzzleHttp\Exception\BadResponseException $e) { // handle exception or api errors. print_r($e->getMessage()); } // ...
Send a fax to one or more destinations. For corporate members without a fax number assigned set the ‘from’ parameter to ‘no_number’. (Permitted scopes: fax:all:edit, fax:fax:edit). To randomly select one of the available numbers per recipient, use comma-separated string.
/** * Example below uses Apache HTTP Client 4 with Fluent API **/Map<String, String> pathParams = new HashMap<>();pathParams.put("user_id", "'13d8z73c'");StrSubstitutor sub = new StrSubstitutor(values, "{", "}");String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}/outbox");String jsonBody = ...; // See request body exampleString result = Request .Post(url) // The x-fax-clientid header is required only when using the OAuth2 token scheme .addHeader("x-fax-clientid", "YOUR CLIENT_ID") .addHeader("Content-Type", "'application/json'") .addHeader("Accept", "'application/json'") .addHeader("Authorization", "'Bearer {access-token}'") .bodyString(jsonBody, "application/json") .execute() .returnContent().asString();System.out.println(result.toString());
package mainimport ( "bytes" "net/http")func main() { headers := map[string][]string{ // The x-fax-clientid header is required only when using the OAuth2 token scheme "Content-Type": []string{"application/json"}, "Accept": []string{"application/json"}, "Authorization": []string{"Bearer {access-token}"}, "x-fax-clientid": []string{"YOUR CLIENT_ID"} } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("POST", "https://restapi.fax.plus/v3/accounts/{user_id}/outbox", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ...}
<?phprequire 'vendor/autoload.php';$headers = array( 'Accept' => 'application/json', 'Authorization' => 'Bearer {access-token}', // The x-fax-clientid header is required only when using the OAuth2 token scheme 'x-fax-clientid' => '{client ID}',);$client = new GuzzleHttp\Client();// Define array of request body.$request_body = ...; // See request body exampletry { $response = $client->request('POST','https://restapi.fax.plus/v3/accounts/{user_id}/outbox', array( 'headers' => $headers, 'json' => $request_body, ) ); print_r($response->getBody()->getContents()); } catch (GuzzleHttp\Exception\BadResponseException $e) { // handle exception or api errors. print_r($e->getMessage()); } // ...
/** * Example below uses Apache HTTP Client 4 with Fluent API **/Map<String, String> pathParams = new HashMap<>();pathParams.put("user_id", "'13d8z73c'");StrSubstitutor sub = new StrSubstitutor(values, "{", "}");String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}/outbox");String jsonBody = ...; // See request body exampleString result = Request .Post(url) // The x-fax-clientid header is required only when using the OAuth2 token scheme .addHeader("x-fax-clientid", "YOUR CLIENT_ID") .addHeader("Content-Type", "'application/json'") .addHeader("Accept", "'application/json'") .addHeader("Authorization", "'Bearer {access-token}'") .bodyString(jsonBody, "application/json") .execute() .returnContent().asString();System.out.println(result.toString());
package mainimport ( "bytes" "net/http")func main() { headers := map[string][]string{ // The x-fax-clientid header is required only when using the OAuth2 token scheme "Content-Type": []string{"application/json"}, "Accept": []string{"application/json"}, "Authorization": []string{"Bearer {access-token}"}, "x-fax-clientid": []string{"YOUR CLIENT_ID"} } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("POST", "https://restapi.fax.plus/v3/accounts/{user_id}/outbox", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ...}
<?phprequire 'vendor/autoload.php';$headers = array( 'Accept' => 'application/json', 'Authorization' => 'Bearer {access-token}', // The x-fax-clientid header is required only when using the OAuth2 token scheme 'x-fax-clientid' => '{client ID}',);$client = new GuzzleHttp\Client();// Define array of request body.$request_body = ...; // See request body exampletry { $response = $client->request('POST','https://restapi.fax.plus/v3/accounts/{user_id}/outbox', array( 'headers' => $headers, 'json' => $request_body, ) ); print_r($response->getBody()->getContents()); } catch (GuzzleHttp\Exception\BadResponseException $e) { // handle exception or api errors. print_r($e->getMessage()); } // ...
List of file names to send. Files should be uploaded beforehand. Required unless from_fax is provided. Can be combined with from_fax to append additional files before the referenced fax file.
Reference to an existing fax whose file to reuse (resend/forward). Required unless files is provided. Can be combined with files to prepend additional documents before the referenced fax file.