Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Authentication Messages not supported #44

Closed
borrmann opened this issue Jun 21, 2023 · 2 comments
Closed

New Authentication Messages not supported #44

borrmann opened this issue Jun 21, 2023 · 2 comments

Comments

@borrmann
Copy link

The WhatsApp Cloud API for sending authentication messages has changed and I think authentication messages are not supported with current version anymore. Here is the link to the docs how a authentication message looks like now:

WhatsApp Cloud Docu

{
  "messaging_product": "whatsapp",
  "recipient_type": "individual",
  "to": "<CUSTOMER_PHONE_NUMBER>",
  "type": "template",
  "template": {
    "name": "<TEMPLATE_NAME>",
    "language": {
      "code": "<TEMPLATE_LANGUAGE_CODE>"
    },
    "components": [
      {
        "type": "body",
        "parameters": [
          {
            "type": "text",
            "text": "<ONE-TIME PASSWORD>"
          }
        ]
      },
      {
        "type": "button",
        "sub_type": "url",
        "index": "0",
        "parameters": [
          {
            "type": "text",
            "text": "<ONE-TIME PASSWORD>"
          }
        ]
      }
    ]
  }
}

The TextMessageComponent currently only takes TextMessageParameters, but to send a one-time password other options should be addable to the List of TextMessageComponents

@gabrieldwight
Copy link
Owner

I will add implementation for the authentication message template with the new change.

@gabrieldwight
Copy link
Owner

Added the implementation of the authentication message template

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants