Skip to main content
GET
/
accounts
/
{user_id}
const axios = require('axios');
const AccountsApiFp = require('@alohi/faxplus-api').AccountsApiFp;
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 getUser() {
    const reqParams = {
        "userId": '473e1eb6'
    }
    const req = await AccountsApiFp(config).getUser(reqParams);
    const resp = await req(axios);
}

getUser()
from faxplus import ApiClient, AccountsApi
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 = AccountsApi(api_client)
resp = api.get_user(
    user_id='473e1eb6')
/**
 * Example below uses Apache HTTP Client 4 with Fluent API
 **/

Map<String, String> pathParams = new HashMap<>();
pathParams.put("user_id", "'473e1eb6'");

StrSubstitutor sub = new StrSubstitutor(values, "{", "}");
String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_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/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}", 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}', 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} \
  -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"'
{
  "account_data": {
    "company_name": "Company name",
    "default_file_type": "pdf",
    "save_history": true
  },
  "account_type": "corporate_admin",
  "creation_date": "2017-05-06 05:22:21",
  "email": "sample@fax.plus",
  "last_password_modification_date": "2017-05-06 05:22:21",
  "lastname": "Smith",
  "member_of": {},
  "notifications": {
    "black_list": {
      "uids": []
    },
    "settings": {
      "email": {
        "addresses": [
          "sample@fax.plus"
        ],
        "low_credit": true,
        "new_feature": true,
        "receive_fax": true,
        "send_fax": true,
        "voicemail": true
      },
      "language": "fa",
      "push_notifications": {
        "low_credit": true,
        "new_feature": true,
        "receive_fax": true,
        "send_fax": true,
        "voicemail": true
      },
      "sms": {
        "low_credit": true,
        "new_feature": true,
        "numbers": [
          "+16699990000"
        ],
        "receive_fax": true,
        "send_fax": true,
        "voicemail": true
      }
    }
  },
  "phone": "+16699990000",
  "profile_image": "",
  "settings": {
    "caller_id_name": "Fax.Plus",
    "send_fax": {
      "options": {},
      "retry": {
        "count": 0,
        "delay": 0
      },
      "should_enhance": true,
      "default_resolution": "fine",
      "partially_sent_retry": false
    }
  },
  "status": "active",
  "uid": "7724157c0974440293e45877c57f0703"
}
{
  "error": "invalid_user_id",
  "description": "Invalid user id given"
}
{
  "error": "unauthorized",
  "description": "The access token provided is expired, revoked, malformed, or invalid for other reasons."
}
{
  "error": "internal_server_error",
  "description": "An unexpected error happened, please contact support"
}
const axios = require('axios');
const AccountsApiFp = require('@alohi/faxplus-api').AccountsApiFp;
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 getUser() {
    const reqParams = {
        "userId": '473e1eb6'
    }
    const req = await AccountsApiFp(config).getUser(reqParams);
    const resp = await req(axios);
}

getUser()
from faxplus import ApiClient, AccountsApi
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 = AccountsApi(api_client)
resp = api.get_user(
    user_id='473e1eb6')
/**
 * Example below uses Apache HTTP Client 4 with Fluent API
 **/

Map<String, String> pathParams = new HashMap<>();
pathParams.put("user_id", "'473e1eb6'");

StrSubstitutor sub = new StrSubstitutor(values, "{", "}");
String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_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/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}", 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}', 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} \
  -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

Authorization
string
header
required

OAuth2 Authorization Grant

Path Parameters

user_id
string
default:self
required

User ID to get information about. For your own account use 'self'

Response

Object containing account information

User account model

account_type
enum<string>
required

Account type which could be corporate_admin, individual, etc

Available options:
corporate_admin,
individual,
corporate_member
creation_date
string
required

Creation date in UTC. Format: YYYY-MM-DD HH:mm:ss

Pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}
email
string
required

Account email address

Pattern: ^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$
status
enum<string>
required

Your account status which could be active, inactive etc

Available options:
active,
unverified_phone,
suspended,
disabled,
inactive,
deleted,
corporate_deleted,
waiting_for_signup
uid
string
required

User ID of current user

account_data
object
last_password_modification_date
string

The date on which you have changed your password

lastname
string

Your last name

member_of
string[]

List of user ids that you are member of.

name
string

Your first name

notifications
object

Account notification settings

phone
string

Your account phone number

Pattern: ^$|^[+]?[0-9]{8,}$
profile_image
string

Profile image path

settings
object

Account settings