Skip to content

quocthanh2694/zalo-chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Zalo chatbot app tutoria demo

Tutotial how to make chatbot with zalo

Step 1

At root project run npm install

Step 2

  • Register OA STORE Zalo account at RegisterOfficalAccount
  • Setting for OA Account Manage OA Account. -- Enable Registration of 3rd Party feature. And choose Edit. -- Setting webhook in category "Server Settings" below the section "Developer information" put URL Callback : [Link address you deployed]/webhook
  • After that, put your oaid and secretkey in index.js file at this code:
var zaConfig = {
  oaid: 'your oaid', // oaid here
  secretkey: 'your secret key' // secretkey here
}

Step 3

  • This below code in index.js just for test send message to an user if you have an userId.
  • You can comment this code if you don't want to test send message or you don't have userId var userId = 'user id'; // just for test.
 ZOAClient.api('sendmessage/text', 'POST', { uid: userId, message: 'Test message!' + date }, function (response) {
    console.log(response);
  });

Step 4

  • run npm start
  • open web at 127.0.0.1:3000 and you will see "Hello world" on you screen

Step 5

  • Deploy to server: you can choose any server to deploy your nodejs project.
  • After deployed you will have ip address or link and put to [Link address you deployed]/webhook in Step 2.

Enjoy by chat with bot on zalo app.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published