Skip to content

Sending Button With Url #2392

Answered by smashah
xirf asked this question in Q&A
Discussion options

You must be logged in to vote

@evaasmakula

You can use B (insiders) to send custom payloads to the internal socket.

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"
                    }
                },
    …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by smashah
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants