Sending SMS via CFD using Web Service REST

Jan_Otto

Bronze Partner
Joined
Sep 11, 2023
Messages
14
Reaction score
0
I need to send a SMS to a incoming mobile number when a call is forwarded to the CFD via a Digital Receptionist. At this stage I'm just testing the API connection with my provider. I have been able to successfully send a SMS using the following PS Script:

$apiKey = "xxxxxx-xxxxxxx-xxxxxxxxx"

$body = @{
sender = "SenderName"
destination = "61412345678"
message = "Hello, this is a test message."
} | ConvertTo-Json

$headers = @{
"Authorization" = "Token $apiKey"
"Accept" = "application/json"
}

$response = Invoke-RestMethod `
-Uri "https://sms.breezeconnect.com.au/api/send" `
-Method Post `
-Headers $headers `
-ContentType "application/json" `
-Body $body

$response

I have not been able to convert it to the config required by CFD:

1790663011088.png

Can someone please advise what the Content string should look like
 
I need to send a SMS to a incoming mobile number when a call is forwarded to the CFD via a Digital Receptionist. At this stage I'm just testing the API connection with my provider. I have been able to successfully send a SMS using the following PS Script:

$apiKey = "xxxxxx-xxxxxxx-xxxxxxxxx"

$body = @{
sender = "SenderName"
destination = "61412345678"
message = "Hello, this is a test message."
} | ConvertTo-Json

$headers = @{
"Authorization" = "Token $apiKey"
"Accept" = "application/json"
}

$response = Invoke-RestMethod `
-Uri "https://sms.breezeconnect.com.au/api/send" `
-Method Post `
-Headers $headers `
-ContentType "application/json" `
-Body $body

$response

I have not been able to convert it to the config required by CFD:

View attachment 52526

Can someone please advise what the Content string should look like
The Content string would be the JSON you want to create, with the full data in it, so you just need to CONCATENATE it or do a REPLACE for the phone number. If you want, DM me. We have a premade CFD that you just have to put your sms provider info it.
 
Also, from your screenshot it seems you're not sending the surrounding braces, you're just sending the properties inside. You will need to specify the full JSON, also using the CONCATENATE function and Frederick mentioned to be able to add variable parts to it.
 

Forum statistics

Threads
112,142
Messages
590,940
Members
165,162
Latest member
lonedigger