Skip to content

com.twilio.exception.ApiConnectionException: Unable to deserialize response: Can not deserialize value of type java.net.URI from String #577

Open
@vteja11

Description

@vteja11

Return the above exception

when using this code

import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.api.v2010.account.IncomingPhoneNumber;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    // DANGER! This is insecure. See http://twil.io/secure
    public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String AUTH_TOKEN = "your_auth_token";

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        ResourceSet<IncomingPhoneNumber> incomingPhoneNumbers =
            IncomingPhoneNumber.reader()
            .limit(20)
            .read();

        for(IncomingPhoneNumber record : incomingPhoneNumbers) {
            System.out.println(record.getSid());
        }
    }
}

Error details:

com.twilio.exception.ApiConnectionException: Unable to deserialize response: Can not deserialize value of type java.net.URI from String 
 "voice_url": "http://sb360.com/forward?PhoneNumber=208-209-3062&FailUrl=http://sb360.com/voicemail?Email=chris@jisekihealth.com&Message=Thanks for calling Jiseki. Please leave a message and%we will get back to you shortly.&Transcribe=true&",  is not a valid textual representation ,problem: Malformed escape pair at index 199```

Metadata

Metadata

Assignees

Labels

status: work in progressTwilio or the community is in the process of implementingtype: bugbug in the library

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions