Open cbrake opened 2 years ago
Sounds like an issue on the backend but we could probably make the logging better on the helper library side. This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog.
I am receiving the same error when I'm running the tutorial. What was the solution to this error? I've been trying to get more verbose error from twilio but the best I can visualize is the parameters are incorrect because there are many
I had a similar issue, which was resolved once I removed the message service SID param from CreateMessageParams
in the CreateMessage
call. In my case it wasn't actually necessary. If you are using a messaging service SID, perhaps confirm the number you're sending from is part of that service.
I am also experiencing this issue. Was there any fix?
creating client like so:
twilioClient := twiliogo.NewRestClientWithParams(twiliogo.ClientParams{
Username: cfg.Twilio.APIKey,
Password: cfg.Twilio.Auth,
AccountSid: cfg.Twilio.AccountSID,
})
followed example like so
params := &twilioApi.CreateMessageParams{}
params.SetTo(myphoneNumber)
params.SetFrom(n.fromSMS)
params.SetBody("Hello from Go!")
resp, err := twilioClient.Api.CreateMessage(params)
if err != nil {
fmt.Println("Error sending SMS message: " + err.Error())
} else {
response, _ := json.Marshal(*resp)
fmt.Println("Response: " + string(response))
}
and getting that Error sending SMS message: error decoding the response for an HTTP error code: 400: invalid character '<' looking for beginning of value
@shwetha-manvinkurke has this been looked at ? this issue was created back in 2021 and so far i don't see a resolution.
Hi all - if you can share any information about what version of the library you are running, and how you downloaded it, that would help a lot - we'd like to fix this.
import "github.com/twilio/twilio-go/client"
import "fmt"
import "runtime"
func main() {
fmt.Println(client.LibraryVersion)
fmt.Println(runtime.Version())
}
lib version: 1.22.0 runtime version: go1.22.4
i ran go get for all the twilio packages i'm using.
Hi @SWFullPotential version 1.22.0 had an error and has since been retracted. Please try v1.22.2 and see if you are still experiencing problems. Thanks!
omg thank you.. I thought i tried that already whoops. thank you.. it's working now
Issue Summary
Yesterday when trying to send SMS messages, I got the following error:
This happened perhaps 6 or so times,, so I instrumented the Twilio code to get more information, but I've not been able to reproduce the issue since.
I think the error is being created here:
https://github.com/twilio/twilio-go/blob/main/client/client.go#L80
Technical details:
I'm in the processing of switching from github.com/kevinburke/twilio-go to this package, so would like to know if anyone else has seen this, or if its just a transient problem.