infobip / infobip-api-java-client Goto Github PK
View Code? Open in Web Editor NEWInfobip API client library in Java.
Home Page: https://www.infobip.com/docs/api
License: MIT License
Infobip API client library in Java.
Home Page: https://www.infobip.com/docs/api
License: MIT License
in the example code :
apiClient.setApiKeyPrefix(API_KEY_PREFIX);
I dont know how to find the “API_KEY_PREFIX”
maven-assembly-plugin causes duplicated classes.
'infobip-api-java-client 1.1.1.jar' contains copied gson and retrofit souce code and maven dependency.
blame ..
675ea98
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]
2.2.0 version has NumberContextQuery
which queries path /number/1/query
. New versions doesn't have such API.
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:
Suggestion:
Make templateId as a String. If I use REST API I can send it as a String and it works properly.
major version 52 is newer than 51, the highest major version supported by this compiler.
Does this library support Android?
It would be great to have endpoints for People feature supported in that SDK.
The infobip.api.config.ApiKeyAuthConfiguration
is assuming that the authorization header is Api apiKey
when according to the documentation it should be App apiKey
I have sent messages and reading messages by a cron job and always getting all messages instead of new messages (unread). Please help. Below is the code i am using.
MOLogsResponse moLogsResponse = this.client.execute(null, null, null, 10, null);
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.
hello.
I would like to use the infobip-api-java-client module to handle the Send OMNI failover message, but there doesn't seem to be any related code in that module.
Is this something that is not supported by that module?
The release notes of 3.0.0 state this release contains breaking changes.
Is there some documentation/guide/tips that explains howto upgrade from 2.3.0
to 3.0.0
?
Hi. Does this library support whatsapp? I have not found setWhatsApp() method for OmniAdvancedRequest class.
Hi. Does this library support sending Viber messages? If not, are there any plans to add Viber support to Infobip API client library?
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.
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.
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:
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?
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.