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 updateUser() {
const reqParams = {
"userId": '473e1eb6',
"payloadAccountModification": {
"account_data": {
"default_file_type": "pdf",
"save_history": true
},
"email": "[email protected]",
"name": "John",
"lastname": "Smith",
"notifications": {
"black_list": {
"uids": []
},
"settings": {
"email": {
"addresses": [
"[email protected]"
],
"low_credit": true,
"new_feature": true,
"receive_fax": true,
"send_fax": true,
"voicemail": true
},
"language": "en",
"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",
"settings": {
"caller_id_name": "Fax.Plus",
"send_fax": {
"options": {},
"retry": {
"count": 0,
"delay": 0
},
"should_enhance": true
}
}
}
}
const req = await AccountsApiFp(config).updateUser(reqParams);
const resp = await req(axios);
}
updateUser()
{
"error": "invalid_user_id",
"description": "Invalid user id given"
}Modify personal information of your own account or your corporate member’s account. user_id can be either self, or a subordinate’s user_id. (Permitted scopes: fax:all:edit, fax:member:edit, fax:user:edit)
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 updateUser() {
const reqParams = {
"userId": '473e1eb6',
"payloadAccountModification": {
"account_data": {
"default_file_type": "pdf",
"save_history": true
},
"email": "[email protected]",
"name": "John",
"lastname": "Smith",
"notifications": {
"black_list": {
"uids": []
},
"settings": {
"email": {
"addresses": [
"[email protected]"
],
"low_credit": true,
"new_feature": true,
"receive_fax": true,
"send_fax": true,
"voicemail": true
},
"language": "en",
"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",
"settings": {
"caller_id_name": "Fax.Plus",
"send_fax": {
"options": {},
"retry": {
"count": 0,
"delay": 0
},
"should_enhance": true
}
}
}
}
const req = await AccountsApiFp(config).updateUser(reqParams);
const resp = await req(axios);
}
updateUser()
{
"error": "invalid_user_id",
"description": "Invalid user id given"
}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 updateUser() {
const reqParams = {
"userId": '473e1eb6',
"payloadAccountModification": {
"account_data": {
"default_file_type": "pdf",
"save_history": true
},
"email": "[email protected]",
"name": "John",
"lastname": "Smith",
"notifications": {
"black_list": {
"uids": []
},
"settings": {
"email": {
"addresses": [
"[email protected]"
],
"low_credit": true,
"new_feature": true,
"receive_fax": true,
"send_fax": true,
"voicemail": true
},
"language": "en",
"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",
"settings": {
"caller_id_name": "Fax.Plus",
"send_fax": {
"options": {},
"retry": {
"count": 0,
"delay": 0
},
"should_enhance": true
}
}
}
}
const req = await AccountsApiFp(config).updateUser(reqParams);
const resp = await req(axios);
}
updateUser()
OAuth2 Authorization Grant
User ID to modify. Use 'self' for your own account, or provide a specific user ID for corporate member accounts.
Request object for making changes in account
Model for updating user account
Show child attributes
File name of your company logo
Your company name in case you are a corporate admin
File type
tiff, pdf Role of the account in the company
Save fax CDRs in inbox status
Account email address
Your last name
Your first name
Account notification settings
Show child attributes
Account notification settings
Show child attributes
Email notification settings
Show child attributes
Set to true if you want to receive notifications when your balance is low
Set to true if you want to receive notifications about our new features
Set to true if you want to receive notifications about receiving faxes
Set to true if you want to receive notifications when your fax is being send
Set to true if you want to receive new voicemail notifications
List of email addresses to send notifications to
Email attachments settings
Show child attributes
Set to true if you want to receive new faxes as notification attachments
Set to true if you want to receive your sent fax as an attachment to the notification
Push notification settings
Show child attributes
Set to true if you want to receive notifications when your balance is low
Set to true if you want to receive notifications about our new features
Set to true if you want to receive notifications about receiving faxes
Set to true if you want to receive notifications when your fax is being send
Set to true if you want to receive new voicemail notifications
SMS notification settings
Show child attributes
Set to true if you want to receive notifications when your balance is low
Set to true if you want to receive notifications about our new features
Set to true if you want to receive notifications about receiving faxes
Set to true if you want to receive notifications when your fax is being send
Set to true if you want to receive new voicemail notifications
List of phone numbers to send SMS notifications to
Notifications language
en Slack notification settings
Show child attributes
with_attachment, no_attachment, off with_attachment, no_attachment, off Channel to send notifications
Your account phone number
Profile image path
Account settings
Show child attributes
Account caller id name
Show child attributes
Enable text enhancement for faxes by default
Default fax resolution
fine, superfine Enable automatic retry for partially sent faxes
Deprecated. Use settings.send_fax.should_enhance instead
Modify account information