troubleshooting Question

character set on REST interface

Avatar of João serras-pereira
João serras-pereiraFlag for Portugal asked on
5 Comments1 Solution55 ViewsLast Modified:
This Question is a follow-up of a previous question with the title "web browser for the REST interface" (previously we could issue follow-up questions, but now I can't find how to do it).

It was sorted and it works (almost) perfectly, using Jim's approach.
Now, my code is:

Public Function sendSMS(strApiKey As String, strApiSecret As String, strTarget As String, strText As String) As String

    strFrom = "myFib"

    Dim strPostURL As String
    Dim arrResponse
    Dim objRequest As New MSXML2.XMLHTTP
    Dim strAnswer As String
    strPostURL = ""
    strPostURL = strPostURL & "?api_key="
    strPostURL = strPostURL & strApiKey
    strPostURL = strPostURL & "&api_secret=" & strApiSecret
    strPostURL = strPostURL & "&from=" & "myFM"
    strPostURL = strPostURL & "&type=unicode"
    strPostURL = strPostURL & "&to=" & strTarget
    strPostURL = strPostURL & "&text=" & strText
    MsgBox strPostURL

    On Error GoTo Error_Handler

    ' Default to false in case anything goes wrong.
    sendSMS = ""
    ' We use xmlHTTP to submit the input values and record the response
    objRequest.Open "POST", strPostURL, False
    arrResponse = objRequest.responseText
    sendSMS = arrResponse
    Exit Function

    On Error Resume Next
    Set objRequest = Nothing
    Exit Function

      MsgBox Err.Description, _
        "ERROR " & Err.Number

    Resume Exit_Handler

End Function

Open in new window

The problem is that it does not accept accented characters (or Unicode)
As per NEXMO's support, I quote:
I've done a further check and I noticed the message seems garbled before reaching Nexmo. I'm wondering if this is something related to your system environment, as I've performed a test with our test numbers and it is working fine.

Could you try a simple debug by using a different tool(maybe POSTMAN or just simply a curl command) to re-send the SMS request again and observe the result?

Can anyone help me?
João serras-pereira

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Log in to continue reading
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform for $9.99/mo
View membership options
Unlock 1 Answer and 5 Comments.
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
The Value of Experts Exchange in My Daily IT Life

Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>


Owner of Outages.IO
Phoenix, Arizona, United States
Member Since 2016
Join a full scale community that combines the best parts of other tools into one platform.
Unlock 1 Answer and 5 Comments.
View membership options
“All of life is about relationships, and EE has made a virtual community a real community. It lifts everyone's boat.”
William Peck

Member since 2004