troubleshooting Question

character set on REST interface

Avatar of João serras-pereira
João serras-pereiraFlag for Portugal asked on
REST
5 Comments1 Solution55 ViewsLast Modified:
Hi.
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 = "https://rest.nexmo.com/sms/json"
    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
    objRequest.Send
   
    arrResponse = objRequest.responseText
    sendSMS = arrResponse
    Exit Function

Exit_Handler:
    On Error Resume Next
    Set objRequest = Nothing
    Exit Function

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

    Resume Exit_Handler

End Function


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?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 5 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros