File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -12,19 +12,18 @@ First, you need a Facebook app with the Whatsapp API activated.
12
12
You can create your first app following [ this steps] ( https://developers.facebook.com/docs/whatsapp/getting-started/signing-up ) .
13
13
Get the API token, either a temporal or a permanent one.
14
14
15
- Now, you can install the module using the following command :
15
+ In your server you can install the module using npm :
16
16
17
17
```
18
18
npm install whatsapp-api-js
19
19
```
20
20
21
-
22
21
Now you can write code like this:
23
22
24
23
``` js
25
- const WhatsAppAPI = require (" whatsapp-js" ).WhatsApp ;
26
- const Handler = require (" whatsapp-js" ).Handlers ;
27
- const { name , phone , birthday } = require (" whatsapp-js" ).Contacts ;
24
+ const WhatsAppAPI = require (" whatsapp-api- js" ).WhatsApp ;
25
+ const Handler = require (" whatsapp-api- js" ).Handlers ;
26
+ const { name , phone , birthday } = require (" whatsapp-api- js" ).Contacts ;
28
27
29
28
const Token = " YOUR_TOKEN" ;
30
29
@@ -65,7 +64,7 @@ While setting up, you will be asked a Verify Token. This can be any string you w
65
64
The app also has a GET wizard for the webhook authentication:
66
65
67
66
``` js
68
- const Handler = require (" whatsapp-js" ).Handlers ;
67
+ const Handler = require (" whatsapp-api- js" ).Handlers ;
69
68
70
69
// Assuming get is called on a GET request to your server
71
70
function get (e ) {
You can’t perform that action at this time.
0 commit comments