Skip to content

yasunchukandriy/zadarma_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📞 Zadarma API — Drupal Module

Drupal module that integrates the Zadarma callback API with a Vue.js-powered phone input component.

PHP Drupal Vue.js JavaScript


📋 Overview

This Drupal module integrates Zadarma cloud telephony into any Drupal-based website. Users enter their phone number via an interactive Vue.js component, and Zadarma automatically initiates a callback connecting the operator with the customer.

How it works:

  1. User enters a phone number via the Vue.js input form
  2. Drupal sends a request to the Zadarma API
  3. Zadarma connects the operator with the client via callback

🗂️ Project Structure

zadarma_api/
├── kp_zadarma/        # Drupal module (PHP) — Zadarma API integration
└── kp_vuejs/          # Vue.js component — interactive phone input

⚙️ Tech Stack

Layer Technology
CMS Drupal
Backend PHP
Frontend Vue.js, JavaScript
Styling CSS
API Zadarma Callback API

🚀 Installation

1. Drupal Module

# Copy kp_zadarma into your Drupal custom modules folder
cp -r kp_zadarma /var/www/html/modules/custom/

# Enable via Drush
drush en kp_zadarma -y

# Or via admin panel:
# Admin → Extend → find "KP Zadarma" → enable

2. API Configuration

Navigate to the module settings:

Admin → Configuration → KP Zadarma Settings

Enter your credentials from the Zadarma dashboard:

  • API Key
  • API Secret
  • Callback phone number

3. Vue.js Component

cd kp_vuejs
npm install
npm run build

🔧 Requirements

  • Drupal 8.x / 9.x / 10.x / 11.x
  • PHP 7.4+
  • Node.js 14+ (for Vue.js build)
  • Active account at zadarma.com

🔒 Security

  • API credentials (key + secret) are stored in Drupal's configuration system, never exposed to the frontend
  • Phone numbers are validated server-side using libphonenumber before any API call
  • The REST endpoint uses Drupal's permission system — only authorized roles can trigger callbacks
  • All communication with Zadarma API happens over HTTPS

📖 Zadarma API Docs

zadarma.com/en/support/api


👤 Author

Andrii Yasynchuk — Senior Full Stack Developer LinkedIn GitHub


📄 License

MIT

About

Drupal 9/10/11 module: Zadarma callback API integration with Vue.js phone input component

Topics

Resources

License

Stars

Watchers

Forks

Contributors