HomeVICIdial TutorialsVICIdial Non Agent API TutorialsUpdating User Details in VICIdial with update_user API

Updating User Details in VICIdial with update_user API

VICIdial is a robust open-source call center solution, providing extensive tools for managing agents, administrators, and campaign users. As organizations grow, there is often a need to update user details—whether it’s modifying access levels, resetting passwords, or changing user groups.

The update_user API allows administrators to modify existing user accounts programmatically, eliminating the need for manual updates and enabling smooth CRM and HR integrations.

Why Use the update_user API?

Easily update user roles, permissions, and credentials
Automate bulk user updates without manual intervention
Seamlessly integrate VICIdial with third-party HR or CRM systems
Ensure security by resetting passwords and enforcing access policies

In this guide, we will cover:
🔹 What the update_user API does
🔹 How to configure and authenticate API access
🔹 How to construct and send API requests
🔹 Examples using a browser, cURL, and Postman
🔹 Understanding API responses and troubleshooting errors
🔹 Best practices for using the update_user API efficiently

Let’s get started! 🚀


Understanding the update_user API Function

The update_user API allows administrators to modify user details in VICIdial dynamically. This function is particularly useful when:

Changing user roles and permissions
Resetting passwords for security purposes
Assigning users to different groups or campaigns
Updating phone extensions and login details

Common Use Cases for update_user API

🔹 Modifying agent details like names, extensions, and passwords
🔹 Adjusting user levels to change access permissions
🔹 Updating phone login credentials
🔹 Assigning users to new groups for workflow optimization


Step 1: Prerequisites for Using the API

Before using the update_user API, ensure you have:

VICIdial installed and configured
An API-enabled user account with administrative permissions
A valid API username and password
The user ID of the account you want to update

How to Enable API Access in VICIdial

1️⃣ Log in to the VICIdial Admin Panel
2️⃣ Navigate to Admin > Users
3️⃣ Select the user who will access the API
4️⃣ Set API Access to 1 (Enabled)
5️⃣ Set User Level to 8 or higher** (Admin-level access) 6️⃣ Add update_userto the **Allowed API Functions** (or set toALL`)
7️⃣ Click Save Changes

Now, your user is authorized to update user details using the API.


Step 2: Constructing the API Request

The VICIdial API uses HTTP GET requests, meaning you can access it via a browser, cURL, or API tools like Postman.

Base API URL

arduino
http://your-vicidial-server/vicidial/non_agent_api.php

🔹 Replace your-vicidial-server with your actual VICIdial instance.

Required Parameters for update_user API

Parameter Description Example
function Specifies the API function (update_user) update_user
user VICIdial API username admin
pass VICIdial API password 1234
source Identifier for tracking API calls CRM_Update
user_id The username of the account to be updated agent001
pass_hash Encrypted password for security 5f4dcc3b5aa765d61d8327deb882cf99
full_name The user’s full name John Doe
user_level Permission level (1-9) 1 (Agent), 7 (Manager), 9 (Admin)
user_group Group assignment for role management MANAGERS
phone_login Phone extension login 9001
phone_pass Password for phone login xyz789
active Status of the user (Y for active, N for inactive) Y

Step 3: Sending the API Request

Method 1: Updating a User via a Web Browser

Simply enter the following URL in your browser (replace credentials accordingly):

pgsql
http://your-vicidial-server/vicidial/non_agent_api.php?function=update_user&user=admin&pass=1234&source=CRM_Update&user_id=agent001&pass_hash=5f4dcc3b5aa765d61d8327deb882cf99&full_name=John Doe&user_level=7&user_group=MANAGERS&phone_login=9001&phone_pass=xyz789&active=Y

🔹 Press Enter, and the API response should confirm the user update.


Method 2: Updating a User via cURL (Command Line)

For developers, cURL is a convenient tool for making API requests. Use the following command:

bash
curl -X GET "http://your-vicidial-server/vicidial/non_agent_api.php?function=update_user&user=admin&pass=1234&source=CRM_Update&user_id=agent001&pass_hash=5f4dcc3b5aa765d61d8327deb882cf99&full_name=John Doe&user_level=7&user_group=MANAGERS&phone_login=9001&phone_pass=xyz789&active=Y"

🔹 This will update the user details and return the API response in the terminal.


Method 3: Updating a User via Postman

1️⃣ Open Postman
2️⃣ Set the request type to GET
3️⃣ Enter the API URL
4️⃣ Click Send
5️⃣ View the API response in the output panel


Step 4: Understanding API Responses

If the request is successful, VICIdial returns a response confirming the user update:

makefile
SUCCESS: agent001|John Doe|Updated

Breaking Down the Response

Value Meaning
agent001 The updated user’s ID
John Doe The full name of the user
Updated Confirmation that the user details were modified

Step 5: Handling Errors & Troubleshooting

If something goes wrong, VICIdial will return an error message instead of a success confirmation.

Common Errors & Fixes

Error Message Cause Solution
ERROR: USER DOES NOT HAVE PERMISSION TO USE THIS FUNCTION Insufficient API permissions Ensure user level is 8+ and API Access is enabled
ERROR: INVALID USERNAME OR PASSWORD Wrong credentials Verify API username and password
ERROR: NO FUNCTION SPECIFIED Missing function parameter Ensure function=update_user is included
ERROR: USER NOT FOUND The username does not exist Verify that the user_id is correct

Step 6: Best Practices for Using the update_user API

Ensure user roles match their responsibilities
Encrypt passwords before updating them via API
Log API updates for tracking and security audits
Test API calls before bulk updates
Automate user updates for efficiency


Conclusion

The update_user API function is an essential tool for managing VICIdial users efficiently. Whether you need to change user roles, reset passwords, or modify login details, this API provides a fast and automated solution.

📌 Key Takeaways

✅ The update_user API modifies VICIdial user details
✅ Requires an API-enabled user with administrative permissions
✅ API requests can be made via browser, cURL, or Postman
✅ Common errors are permission and input-related and can be fixed in Admin settings

Feel free to contact us or simply start a live chat to get connected to one of our team members. Here is our contact information.

Calling from US: +1 954-990-0053
Email: office@callix.ai

- Advertisement -spot_img

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Special Offerspot_img

Must Read

spot_img
spot_img
spot_img

Related Articles - Must Read

spot_img