Giter Site home page Giter Site logo

infobip-api-java-client's People

Contributors

anamarjanovic avatar cesljasdavor avatar hkozacinski-ib avatar ib-fsrnec avatar josipk-ib avatar lvukadinovic-ib avatar mbruncic avatar nmenkovic-ib avatar pducic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

infobip-api-java-client's Issues

Error mapping Response type UTILITY on enum com.infobip.model.WhatsAppCategory

Hi, we are having an issue trying to read the Infobip WhatsApp templates.

There was an error when reading the response body. Infobip API responded with status code 200 upon calling GET /whatsapp/2/senders/XXXXXXXXX/templates. This can happen due to a response timeout, networking issues or an invalid deserialization definition. Check the exception's root cause for more details. If you are having trouble interpreting the error, contact [email protected] or open an issue on our Github repo.Include all details you find relevant. Thank you for using our library!

java.lang.IllegalArgumentException: Unexpected enum value 'UTILITY'.
at com.infobip.model.WhatsAppCategory.fromValue(WhatsAppCategory.java:57) ~[infobip-api-java-client-4.0.0.jar:na]
at jdk.internal.reflect.GeneratedMethodAccessor154.invoke(Unknown Source) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]

Missed /number/1/query API

2.2.0 version has NumberContextQuery which queries path /number/1/query. New versions doesn't have such API.

Template Id cannot be cast to Integer

Version v4.0.0 and

When i generate broadcast template in dashboard I get templateId that is greater then 2147483647.

sendEmail() method accepts templateId as Integer so we can never send that template if generated id is greater then max value for Integer.

Current workaround is to use REST API not SDK. We can send it as a String then.

Recreation:

  1. Generate new template inside Dashboard and make sure that generated template id is greater then 2147483647
  2. Try to cast it to integer
  3. It will fail with error that it is not able to cast it since it is too big

Suggestion:
Make templateId as a String. If I use REST API I can send it as a String and it works properly.

Android compiler issue

major version 52 is newer than 51, the highest major version supported by this compiler.
Does this library support Android?

SocketTimeoutException while sending SMS

Hi,

We are getting below error when sending an SMS.

with cause = 'java.net.SocketTimeoutException: connect timed out' and exception = 'connect timed out'

retrofit.RetrofitError: connect timed out
at retrofit.RetrofitError.networkError(RetrofitError.java:27)
at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:395)
at retrofit.RestAdapter$RestHandler.invoke(RestAdapter.java:240)
at infobip.api.client.$Proxy213.execute(Unknown Source)
at infobip.api.client.SendSingleTextualSms.execute(SendSingleTextualSms.java:36)

Please help us to fix it.

WhatsApp support

Hi. Does this library support whatsapp? I have not found setWhatsApp() method for OmniAdvancedRequest class.

Viber support

Hi. Does this library support sending Viber messages? If not, are there any plans to add Viber support to Infobip API client library?

Does the SDK supported multiple destinations or multiple cc or multiple bcc?

Dear team,
Our team wants to send email or SMS via infobip platform. But I haven't found the function which is using for multiple destinations/cc/bcc in the SDK (3.2.0).
If the SDK doesn't support it, should I send a request for each recipient? Or can I set each recipient in the request body? such as the fllow screenshot,
Your reply will be really appreciated.

image

Super classes for model classes

It would be great for better programming to have proper super classes for the model classes. For example, all WhatsApp model classes have fields like "from", "to", "messageId", "callbackData" and notfiyUrl (Inlcuding getters).
This also applies to the SendWhatsApp<...>Request classes and the object they return with the executeMethod.

For example, I want to have a method which sends the request to do some processing which is not dependent on the type of request, but using the current classes I have to do a lot of method overriding, duplicating code and e.g. using lamdas to send the requests instead of handling an abstract request.

NoSuchMethodError when sending Whatsapp Text Message

Hi Team,

We have strange behavior with Infobip Java Client and 4.0.0. when we want to send a WhatsApp text message to recipient in conversation already initiated scenario.
According to your documentation we should use "SendWhatsAppApi" class but there is nothing like that in version 4.0.0:

image

What we do is try to send message using following code:

        WhatsAppTextMessage textMessage = new WhatsAppTextMessage()
                .from("ValidFrom")
                .to("ValidTO")
                .content(new WhatsAppTextContent().text("TEXT");
                 textMessage.setNotifyUrl("url");
        try {
            WhatsAppSingleMessageInfo whatsAppMessageInfo = whatsAppApi.sendWhatsAppTextMessage(textMessage).execute();
            processedResponse = processResponse(whatsAppMessageInfo, whatsappMessage);
        } catch (ApiException e) {
            appEventHandler.error("Error sending single text message: ",e);
        }

so by using WhatsAppApi class:
WhatsAppSingleMessageInfo whatsAppMessageInfo = whatsAppApi.sendWhatsAppTextMessage(textMessage).execute();

but we're getting error:

Exception in thread “Thread-12” java.lang.NoSuchMethodError: ‘okhttp3.RequestBody okhttp3.RequestBody.create(java.lang.String, okhttp3.MediaType)’
at com.infobip.RequestFactory.buildRequestBody(RequestFactory.java:159)
at com.infobip.RequestFactory.create(RequestFactory.java:89)
at com.infobip.ApiClient.buildCall(ApiClient.java:409)
at com.infobip.ApiClient.execute(ApiClient.java:336)
at com.infobip.api.WhatsAppApi$SendWhatsAppTextMessageRequest.execute(WhatsAppApi.java:1397)

Could you help us identify if there is wrong configuration on our side or there is bug in client?

How to detect file content/media type of incoming attachment

Hi Team,
Is there a way how we can detect what is content type of file that is attached under url attribute in incoming message? Or the type of the file is always the same, VIDEO will be always mp4 format so it will be "video/mp4" and Infobip VOICE will be always "audio/ogg"?
Context:
When we receive incoming message with url we want to check what is the contentType so we can store in our our S3 bucket. To do it we need MIME Type of the file.
To download file we use Infobip Java Client downloadWhatsAppInboundMedia().execute() but this is returning File object without extension. We tried also usage of your example with WhatsAppWebhookInboundMessageResult approach but all we get there is Infobip specific types like VOICE or IMAGE, but no details around extension.

While we acknowledge the possibility of retrieving this information via classic HTTP Requests and parsing the headers, we strive to maintain consistency in our integration and continue leveraging the Infobip API Client without introducing unnecessary complexity.
Could you kindly advise if there's a method within the Infobip Java Clientthat allows us to obtain MIME Type or file extension directly from the received message?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.