const axios = require('axios');
const FilesApiFp = require('@alohi/faxplus-api').FilesApiFp;
const Configuration = require('@alohi/faxplus-api').Configuration;
const config = new Configuration({
accessToken: accessToken,
basePath: 'https://restapi.fax.plus/v3',
// Header required only when using the OAuth2 token scheme
baseOptions: {
headers: {
"x-fax-clientid": clientId,
}
}
});
async function getFaxReport() {
const reqParams = {
"userId": '13d8z73c',
"faxId": '132esd4cs31'
}
const req = await FilesApiFp(config).getFaxReport(reqParams);
const resp = await req(axios);
}
getFaxReport()
from faxplus import ApiClient, FilesApi
from faxplus.configuration import Configuration
conf = Configuration()
conf.access_token = access_token
# header_name and header_value required only when using the OAuth2 token scheme
api_client = ApiClient(header_name='x-fax-clientid', header_value=client_id, configuration=conf)
api = FilesApi(api_client)
resp = api.get_fax_report(
user_id='13d8z73c',
fax_id='132esd4cs31')
/**
* Example below uses Apache HTTP Client 4 with Fluent API
**/
Map<String, String> pathParams = new HashMap<>();
pathParams.put("user_id", "'13d8z73c'");
pathParams.put("fax_id", "'132esd4cs31'");
StrSubstitutor sub = new StrSubstitutor(values, "{", "}");
String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}/report/{fax_id}");
String result = Request
.Get(url)
// The x-fax-clientid header is required only when using the OAuth2 token scheme
.addHeader("x-fax-clientid", "YOUR CLIENT_ID")
.addHeader("Accept", "'application/pdf'")
.addHeader("Authorization", "'Bearer {access-token}'")
.execute()
.returnContent().asString();
System.out.println(result.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
// The x-fax-clientid header is required only when using the OAuth2 token scheme
"Accept": []string{"application/pdf"},
"Authorization": []string{"Bearer {access-token}"},
"x-fax-clientid": []string{"YOUR CLIENT_ID"}
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://restapi.fax.plus/v3/accounts/{user_id}/report/{fax_id}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
<?php
require '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();
try {
$response = $client->request('GET','https://restapi.fax.plus/v3/accounts/{user_id}/report/{fax_id}', array(
'headers' => $headers,
)
);
print_r($response->getBody()->getContents());
}
catch (GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
# You can also use wget
curl -X GET https://restapi.fax.plus/v3/accounts/{user_id}/report/{fax_id} \
-H 'Accept: application/pdf' \
-H 'Authorization: Bearer {access-token}' \
# The x-fax-clientid header is required only when using the OAuth2 token scheme
-H 'x-fax-clientid: "YOUR CLIENT_ID"'
"<string>"{
"error": "invalid_user_id",
"description": "Invalid user id given"
}{
"error": "internal_server_error",
"description": "An unexpected error happened, please contact support"
}Files
Get fax confirmation report
Retrieve fax confirmation report (Permitted scopes: fax:all:read, fax:fax:read)
GET
/
accounts
/
{user_id}
/
report
/
{fax_id}
const axios = require('axios');
const FilesApiFp = require('@alohi/faxplus-api').FilesApiFp;
const Configuration = require('@alohi/faxplus-api').Configuration;
const config = new Configuration({
accessToken: accessToken,
basePath: 'https://restapi.fax.plus/v3',
// Header required only when using the OAuth2 token scheme
baseOptions: {
headers: {
"x-fax-clientid": clientId,
}
}
});
async function getFaxReport() {
const reqParams = {
"userId": '13d8z73c',
"faxId": '132esd4cs31'
}
const req = await FilesApiFp(config).getFaxReport(reqParams);
const resp = await req(axios);
}
getFaxReport()
from faxplus import ApiClient, FilesApi
from faxplus.configuration import Configuration
conf = Configuration()
conf.access_token = access_token
# header_name and header_value required only when using the OAuth2 token scheme
api_client = ApiClient(header_name='x-fax-clientid', header_value=client_id, configuration=conf)
api = FilesApi(api_client)
resp = api.get_fax_report(
user_id='13d8z73c',
fax_id='132esd4cs31')
/**
* Example below uses Apache HTTP Client 4 with Fluent API
**/
Map<String, String> pathParams = new HashMap<>();
pathParams.put("user_id", "'13d8z73c'");
pathParams.put("fax_id", "'132esd4cs31'");
StrSubstitutor sub = new StrSubstitutor(values, "{", "}");
String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}/report/{fax_id}");
String result = Request
.Get(url)
// The x-fax-clientid header is required only when using the OAuth2 token scheme
.addHeader("x-fax-clientid", "YOUR CLIENT_ID")
.addHeader("Accept", "'application/pdf'")
.addHeader("Authorization", "'Bearer {access-token}'")
.execute()
.returnContent().asString();
System.out.println(result.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
// The x-fax-clientid header is required only when using the OAuth2 token scheme
"Accept": []string{"application/pdf"},
"Authorization": []string{"Bearer {access-token}"},
"x-fax-clientid": []string{"YOUR CLIENT_ID"}
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://restapi.fax.plus/v3/accounts/{user_id}/report/{fax_id}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
<?php
require '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();
try {
$response = $client->request('GET','https://restapi.fax.plus/v3/accounts/{user_id}/report/{fax_id}', array(
'headers' => $headers,
)
);
print_r($response->getBody()->getContents());
}
catch (GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
# You can also use wget
curl -X GET https://restapi.fax.plus/v3/accounts/{user_id}/report/{fax_id} \
-H 'Accept: application/pdf' \
-H 'Authorization: Bearer {access-token}' \
# The x-fax-clientid header is required only when using the OAuth2 token scheme
-H 'x-fax-clientid: "YOUR CLIENT_ID"'
"<string>"{
"error": "invalid_user_id",
"description": "Invalid user id given"
}{
"error": "internal_server_error",
"description": "An unexpected error happened, please contact support"
}const axios = require('axios');
const FilesApiFp = require('@alohi/faxplus-api').FilesApiFp;
const Configuration = require('@alohi/faxplus-api').Configuration;
const config = new Configuration({
accessToken: accessToken,
basePath: 'https://restapi.fax.plus/v3',
// Header required only when using the OAuth2 token scheme
baseOptions: {
headers: {
"x-fax-clientid": clientId,
}
}
});
async function getFaxReport() {
const reqParams = {
"userId": '13d8z73c',
"faxId": '132esd4cs31'
}
const req = await FilesApiFp(config).getFaxReport(reqParams);
const resp = await req(axios);
}
getFaxReport()
from faxplus import ApiClient, FilesApi
from faxplus.configuration import Configuration
conf = Configuration()
conf.access_token = access_token
# header_name and header_value required only when using the OAuth2 token scheme
api_client = ApiClient(header_name='x-fax-clientid', header_value=client_id, configuration=conf)
api = FilesApi(api_client)
resp = api.get_fax_report(
user_id='13d8z73c',
fax_id='132esd4cs31')
/**
* Example below uses Apache HTTP Client 4 with Fluent API
**/
Map<String, String> pathParams = new HashMap<>();
pathParams.put("user_id", "'13d8z73c'");
pathParams.put("fax_id", "'132esd4cs31'");
StrSubstitutor sub = new StrSubstitutor(values, "{", "}");
String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}/report/{fax_id}");
String result = Request
.Get(url)
// The x-fax-clientid header is required only when using the OAuth2 token scheme
.addHeader("x-fax-clientid", "YOUR CLIENT_ID")
.addHeader("Accept", "'application/pdf'")
.addHeader("Authorization", "'Bearer {access-token}'")
.execute()
.returnContent().asString();
System.out.println(result.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
// The x-fax-clientid header is required only when using the OAuth2 token scheme
"Accept": []string{"application/pdf"},
"Authorization": []string{"Bearer {access-token}"},
"x-fax-clientid": []string{"YOUR CLIENT_ID"}
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://restapi.fax.plus/v3/accounts/{user_id}/report/{fax_id}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
<?php
require '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();
try {
$response = $client->request('GET','https://restapi.fax.plus/v3/accounts/{user_id}/report/{fax_id}', array(
'headers' => $headers,
)
);
print_r($response->getBody()->getContents());
}
catch (GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
# You can also use wget
curl -X GET https://restapi.fax.plus/v3/accounts/{user_id}/report/{fax_id} \
-H 'Accept: application/pdf' \
-H 'Authorization: Bearer {access-token}' \
# The x-fax-clientid header is required only when using the OAuth2 token scheme
-H 'x-fax-clientid: "YOUR CLIENT_ID"'
Authorizations
oauth2personal_access_token
OAuth2 Authorization Grant
Path Parameters
User ID. Use 'self' for your own account, or provide a specific user ID for corporate member accounts.
ID of the fax which you want to download
Response
Confirmation fax report in PDF
Binary data. Will save to file and return file path if _preload_content is True, otherwise will return binary stream
⌘I