hello sir
how to make CURL to ASP.net Method or code
i have a CURL code but i need it to use in asp.net c# to send a whatsapp message.
You can view comprehensive API Documentation and coding here: https://docs.imiconnect.com/reference#whatsapp.
curl -X POST \
https://api.imiconnect.io/resources/v1/messaging \
-H 'Content-Type: application/json' \
-H 'key: <service key>' \
-d '{
"appid":"a_156223083298144540",
"deliverychannel":"whatsapp",
"channels":{
"OTT-Messaging":{
"wa":{
"type":"hsm",
"hsm":{
"namespace":"59ae27be_a774_420c_18ae_22040d30978f",
"element_name":"appointment",
"language":{
"code":"en_gb",
"policy":"deterministic"
},
"localizable_params":[
{
"default":"Akash"
},
{
"default":"SRZ1235432"
},
{
"default":"car service"
}
]
}
}
}
},
"destination":[
{
"waid":[
"91XXXXXXXXXX"
]
}
]
}'
the parameters:
- Service Key: Use f55c3518-3dc0-11ea-bf0b-0213261164bb
- App ID: Identifier for the specific application in IMIconnect. For your account, use a_157354522561438800
- Namespace: Identifier for the specific WhatsApp account. Use 59ae27be_a774_420c_18ae_22040d30978f
- Element Name: The element name that indicates which template to use within the namespace
- Localizable_params: These are custom fields for the variables in the template. Please refer to the Localizable Parameters section for more information
- Delivery channel: Specifies the channel you are using to send the message. Use whatsapp
- Type: The type of message being sent. Default: text. Other options: image, audio, document, hsm
- HSM: The containing element for the message content — Indicates that the message is highly structured. Parameters contained within provide the structure.
- WAID: The list of mobile numbers to which the message will be sent. The format to be used should include ‘country code’ and ‘phone number’.
- Phone number for WA Demo: +91 40 7101 1545
Here are a few sample templates to get you started:
· Element name: appointment
Content:
Hi {{1}}, thank you for registering for your {{3}} appointment. Your reference is {{2}}
· Element name: account_update_salesforcedemo
Content:
Dear {{1}}, thank you for your interest in IMIconnect. This message is to inform you that your account has been created successfully. Please rate your experience of using our product on a scale of 1 to 10 by responding to this message.