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

KeyType
Authorization {{adminToken}}

or

KeyType
Qiscus-App-Id{{appId}}
Qiscus-Secret-Key{{secretKey}}

BODY

KeyType
channel_idoptional, if null will use first wa channel
template_namerequired
namespacerequired
languagestring, required
variablesarray of string, required
phone_numberstring, required
button_paramsrequired if template has CTA dynamic button
header_valuerequired if template has header variable
hide_variablestrue

 

Need further assistance?

Our helpful customer support team is available to help you with any inquiries you may have

Contact Us