How to Hide Message Variable(s) in Qiscus Omnichannel Dashboard?
To hide the variable and make it visible only to the recipient (your customers), you have to add hide_variables in the body. However, the API in this documentation does not support that hide_variables. You can use the following API instead.
API Endpoint:
https://omnichannel.qiscus.com/api/v3/admin/broadcast/client
Example request:
curl --location 'https://omnichannel.qiscus.com/api/v3/admin/broadcast/client'
--header 'Qiscus-App-Id: {{appID}}'
--header 'Qiscus-Secret-Key: {{secretKey}}'
--header 'Content-Type: application/json'
--data '{
"phone_number": "{{phoneNumber}}",
"channel_id": {{channelID}},
"template_name": "{{templateName}}",
"namespace": "{{namespace}}",
"language": "id",
"variables": [
"{{variable1}}",
"{{variable2}}"
],
"hide_variables": true,
"header_value": {
"type": "text",
"text": "{{headerVariable}}"
},
"button_params": [
{
"type": "url",
"values": "{{buttonVariable}}",
"index": 0
}
]
}'
Example response:
{
    "data": {
        "broadcast_job_id": xxx24,
        "broadcast_logs": [
            {
                "id": 12371070,
                "message_id": "gBGHxxxSGUDxsVcB",
                "notes": null,
                "phone_number": "+6285xxxx3456",
                "sent_at": "2021-08-23T07:54:49Z",
                "status": "sent",
                "variables": "["test"]"
            }
        ],
        "language": "en",
        "name": "paxxxx_coxxxrmaxn",
        "namespace": "6616bb93_xxxx_41e7_8bbe_2c528219e56e"
    },
    "status": 200
}HEADERS
| Key | Type | 
|---|---|
| Authorization | {{adminToken}} | 
or
| Key | Type | 
|---|---|
| Qiscus-App-Id | {{appId}} | 
| Qiscus-Secret-Key | {{secretKey}} | 
BODY
| Key | Type | 
|---|---|
| channel_id | optional, if null will use first wa channel | 
| template_name | required | 
| namespace | required | 
| language | string, required | 
| variables | array of string, required | 
| phone_number | string, required | 
| button_params | required if template has CTA dynamic button | 
| header_value | required if template has header variable | 
| hide_variables | true | 
