79541127

Date: 2025-03-28 10:12:05
Score: 0.5
Natty:
Report link

Helo based on the docs here https://developers.mekari.com/docs/kb/hmac-authentication/node#creating-hmac-signature

you may need to add header 'Date' also with Format must follow RFC7231. Example: Wed, 10 Nov 2021 07:24:29 GMT

shouldbe like this

curl --request POST 'https://api.mekari.com/qontak/chat/v1/broadcasts/whatsapp/direct' \
        --header 'Authorization: hmac username="{{Username}}", algorithm="hmac-sha256", headers="date request-line", signature="{{Signature}}"' \
        --header 'Date: Fri, 28 Mar 2025 10:04:47 GMT' \
        --header 'Content-Type: application/json' \
        --data-raw '{
  "to_name": "Test User",
  "to_number": "6281234567890",
  "message_template_id": "60cccaa0-ccd9-4efd-bdfb-875859c4b50a",
  "channel_integration_id": "56b60c3c-0123-46af-958b-32f3ad12ee37",
  "language": {
    "code": "id"
  },
  "parameters": {
    "buttons": [
      {
        "index": "0",
        "type": "url",
        "value": "123456"
      }
    ],
    "body": [
      {
        "key": "1",
        "value_text": "123454321",
        "value": "otp"
      }
    ]
  }
}' | jq

voila!

Reasons:
  • Probably link only (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Burhanudin Hakim