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
Account email address
Your last name
Your first name
Account notification settings
Show child attributes
Your account phone number
Profile image path
Account settings
Show child attributes
Modify account information