Closed smashah closed 2 years ago
URL, Call + standard button example
await client.B(chatId, {
"templateMessage": {
"hydratedTemplate": {
"hydratedButtons": [
{
"index": 1,
"urlButton": {
"displayText": "I am a link",
"url": "https://github.com/open-wa/wa-automate-nodejs"
}
},
{
"index": 2,
"callButton": {
"displayText": "Call me now!",
"phoneNumber": "+1234567890"
}
},
{
"index": 3,
"quickReplyButton": {
"displayText": "Or just click me",
"id": "button-1"
}
}
],
"hydratedContentText": "content",
"hydratedFooterText": "footerer"
}
}
});
@github-actions run
@github-actions run
can you give us example for easy API request JSON format?
can you give us example for easy API request JSON format?
https://github.com/open-wa/wa-automate-nodejs/discussions/2669
can you give us example for easy API request JSON format?
2669
Thank you so much
can you give us example for easy API request JSON format?
2669
why is it returning error, is there and update ?
{ "success": false, "error": { "name": "Error", "message": "Evaluation failed: TypeError: _0x8e9447_0x3ab137(...) is not a function\n at eval (eval at
(:1:10), :1:86675)\n at Array.map ( )\n at eval (eval at (:1:10), :1:86557)" } }
Can't tell why you're getting that error unless you share code and context
sorry for missing the context
a day before I was testing https://github.com/open-wa/wa-automate-nodejs/issues/2394#issuecomment-1128937794 using Postman for Baileys endpoint .. and it works, in the morning all the payload are returning error
and then I was trying the sendButtons endpoint using last known works example { "args": { "to": "62811229454@c.us", "body": { "caption": "Paskal Roadshow Jakarta", "lat": -6.2, "lng": 106.8 }, "buttons": [ {"id":"1","text":"Registrasi"}, {"id":"2","text":"FAQ"}, {"id":"1","text":"Term of Service"} ], "title": "Welcome Message", "footer": "Paskal Indonesia" } }
and give return error as
{"success":false,"error":{"name":"Error","message":"Evaluation failed: TypeError: _0x21a700_0x581b93(...) is not a function\n at eval (eval at
I just used the npx easy API and didn't change anything
@github-actions run
d4ec9db
client.sendAdvancedButtons
#2394 3bb536f
c997e0a
4715329
27974ee
2784c98
4209285
ec0c25a
50ba3e6
@idham please try again and see https://github.com/open-wa/wa-automate-nodejs/discussions/2669 for how to use advanced buttons
thx @smashah for the update, I didn't change anything and it works now
I'm new to using this library and I'm testing how button submission works for an application I'm developing.
With the code used for the test it has been impossible for me to send the buttons.
Is there any problem or limitation that prevents the correct operation of sending buttons?
I would appreciate any kind of help to be able to send buttons with the sendButtons function
Thank you
const wa = require('@open-wa/wa-automate');
wa.create({ sessionId: "COVID_HELPER", multiDevice: true, //required to enable multiDevice support authTimeout: 60, //wait only 60 seconds to get a connection with the host account device blockCrashLogs: true, disableSpins: true, headless: true, hostNotificationLang: 'PT_BR', logConsole: true, popup: true, qrTimeout: 0, //0 means it will wait forever for you to scan the qr code }).then(client => start(client));
function start(client) { client.onMessage(async message => { console.log(message);
if (message.body === 'Hi') {
await client.sendText(message.from, 'π Hello!');
}
if (message.body === 'Buttons') {
await client.sendButtons(message.from, "Body", [
{
id: "1",
"text": "Click"
},
{
id: "1",
"text": "Call"
},
{
id: "1",
"text": "Open Link"
}
], "title", "footer");
}
}); }
@dafner buttons on MD requires a license π
Thanks for your prompt answer!
I have a cuestion, I probed other libraries from github and it's imposible to send buttons due a limitation of WA Business MultiDevice
If I purchase a license, you can assure me that I could send buttons and List without problems?
Wich kind of licence I must be purchase ? A Restricted License Key or insiders Programs?
I must purchase one licence for every number that I used in my development?
Thanks
El 22/06/2022 a las 10:38 p.Β m., Mohammed Shah escribiΓ³:
@dafner https://github.com/dafner buttons on MD requires a license π
β Reply to this email directly, view it on GitHub https://github.com/open-wa/wa-automate-nodejs/issues/2394#issuecomment-1163829011, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACR6454B5VBPYPFC2PVLQLLVQO5YJANCNFSM5LCZY27Q. You are receiving this because you were mentioned.Message ID: @.***>
@dafner Insiders gives you access to buttons, Restricted will allow you to start conversations with non-contacts.
I just tested - list buttons are working with MD business accounts.
Yes 1 licenses is linked to just 1 host account. If you need more than 5 please email me: shah@openwa.dev
Buttons will not be GA for the foreseeable future. It looks like they will be restricting usage of buttons to verified business accounts only anyways soon.
It's time
98