const axios = require('axios');
const OutboxApiFp = require('@alohi/faxplus-api').OutboxApiFp;
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 listOutboxFaxes() {
const reqParams = {
"userId": '13d8z73c'
}
const req = await OutboxApiFp(config).listOutboxFaxes(reqParams);
const resp = await req(axios);
}
listOutboxFaxes()
from faxplus import ApiClient, OutboxApi
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 = OutboxApi(api_client)
resp = api.list_outbox_faxes(
user_id='13d8z73c')
/**
* 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 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/json'")
.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/json"},
"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}/outbox", 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}/outbox', 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}/outbox \
-H 'Accept: application/json' \
-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"'
{
"records": [
{
"comment": {
"tags": [],
"text": ""
},
"contact_name": "",
"designated_src": "",
"extra_info": {},
"file_changes": [],
"files": [
"/transient-29362c0c-eeff-45c1-9f4e-4ef5865a41df"
],
"id": "13a4afb0585345639733857e8f36df8d",
"initiated_from": {
"from_id": "",
"type": ""
},
"ip": "8.8.8.8",
"last_updated_status_time": "2017-09-24 06:43:04",
"options": {},
"page_count": 0,
"retry": {
"count": 0,
"delay": 0
},
"send_time": "2017-09-24 06:43:04 +0000",
"should_enhance": false,
"src": "+16699990000",
"status": "submitted",
"status_changes": [
{
"at": "2017-09-24 06:43:04",
"status": "submitted"
}
],
"submit_time": "2017-09-24 06:43:04 +0000",
"to": [
"+16699990000"
],
"uid": "53a1afb8585345a39033857e1f36bf8d"
}
]
}{
"error": "invalid_user_id",
"description": "Invalid user id given"
}{
"error": "internal_server_error",
"description": "An unexpected error happened, please contact support"
}Outbox
List faxes in the outbox
Get a list of the faxes in the outbox which were not yet sent. (Permitted scopes: fax:all:read, fax:fax:read)
GET
/
accounts
/
{user_id}
/
outbox
const axios = require('axios');
const OutboxApiFp = require('@alohi/faxplus-api').OutboxApiFp;
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 listOutboxFaxes() {
const reqParams = {
"userId": '13d8z73c'
}
const req = await OutboxApiFp(config).listOutboxFaxes(reqParams);
const resp = await req(axios);
}
listOutboxFaxes()
from faxplus import ApiClient, OutboxApi
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 = OutboxApi(api_client)
resp = api.list_outbox_faxes(
user_id='13d8z73c')
/**
* 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 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/json'")
.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/json"},
"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}/outbox", 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}/outbox', 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}/outbox \
-H 'Accept: application/json' \
-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"'
{
"records": [
{
"comment": {
"tags": [],
"text": ""
},
"contact_name": "",
"designated_src": "",
"extra_info": {},
"file_changes": [],
"files": [
"/transient-29362c0c-eeff-45c1-9f4e-4ef5865a41df"
],
"id": "13a4afb0585345639733857e8f36df8d",
"initiated_from": {
"from_id": "",
"type": ""
},
"ip": "8.8.8.8",
"last_updated_status_time": "2017-09-24 06:43:04",
"options": {},
"page_count": 0,
"retry": {
"count": 0,
"delay": 0
},
"send_time": "2017-09-24 06:43:04 +0000",
"should_enhance": false,
"src": "+16699990000",
"status": "submitted",
"status_changes": [
{
"at": "2017-09-24 06:43:04",
"status": "submitted"
}
],
"submit_time": "2017-09-24 06:43:04 +0000",
"to": [
"+16699990000"
],
"uid": "53a1afb8585345a39033857e1f36bf8d"
}
]
}{
"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 OutboxApiFp = require('@alohi/faxplus-api').OutboxApiFp;
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 listOutboxFaxes() {
const reqParams = {
"userId": '13d8z73c'
}
const req = await OutboxApiFp(config).listOutboxFaxes(reqParams);
const resp = await req(axios);
}
listOutboxFaxes()
from faxplus import ApiClient, OutboxApi
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 = OutboxApi(api_client)
resp = api.list_outbox_faxes(
user_id='13d8z73c')
/**
* 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 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/json'")
.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/json"},
"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}/outbox", 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}/outbox', 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}/outbox \
-H 'Accept: application/json' \
-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.
Response
Response containing a list of faxes waiting to be sent
List of the outgoing faxes
Show child attributes
Show child attributes
⌘I