{"id":19337295,"url":"https://github.com/infobip/oneapi-java","last_synced_at":"2025-10-16T21:23:25.125Z","repository":{"id":4345535,"uuid":"5481483","full_name":"infobip/oneapi-java","owner":"infobip","description":"oneapi-java","archived":false,"fork":false,"pushed_at":"2023-03-29T11:09:21.000Z","size":3723,"stargazers_count":11,"open_issues_count":2,"forks_count":11,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-04-02T06:12:24.248Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/infobip.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2012-08-20T13:26:34.000Z","updated_at":"2016-10-04T09:07:34.000Z","dependencies_parsed_at":"2023-07-05T19:33:17.696Z","dependency_job_id":null,"html_url":"https://github.com/infobip/oneapi-java","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infobip%2Foneapi-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infobip%2Foneapi-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infobip%2Foneapi-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infobip%2Foneapi-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/infobip","download_url":"https://codeload.github.com/infobip/oneapi-java/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250352200,"owners_count":21416454,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T03:13:59.968Z","updated_at":"2025-10-08T16:28:01.601Z","avatar_url":"https://github.com/infobip.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## ⚠️ Deprecated\n\n**This repository is deprecated and no longer actively maintained, it will be archived in the near future.**\n\nIf you're looking for an active alternative, we recommend using [infobip-api-java-client](https://github.com/infobip/infobip-api-java-client) instead.\n\nYou’re still welcome to browse or fork the code, but issues and pull requests will not be monitored.\n\nOneApi Java client\n============================\n\nBasic messaging example\n-----------------------\n\nFirst initialize the messaging client using your username and password:\n\n    Configuration configuration = new Configuration(USERNAME, PASSWORD);\n    SMSClient smsClient = new SMSClient(configuration);\n\n\nAn exception will be thrown if your username and/or password are incorrect.\n\nPrepare the message:\n\n    SMSRequest smsRequest = new SMSRequest(SENDER, MESSAGE, DESTINATION);\n\n\nSend the message:\n\n    // Store request id because we can later query for the delivery status with it:\n    SendMessageResult sendMessageResult = smsClient.getSMSMessagingClient().sendSMS(smsRequest);\n\n\nLater you can query for the delivery status of the message:\n\n    DeliveryInfoList deliveryInfoList = smsClient.getSMSMessagingClient().queryDeliveryStatus(SENDER, sendMessageResult.getClientCorrelator());\n    String deliveryStatus = deliveryInfoList.getDeliveryInfo().get(0).getDeliveryStatus();\n\n\nPossible statuses are: **DeliveredToTerminal**, **DeliveryUncertain**, **DeliveryImpossible**, **MessageWaiting** and **DeliveredToNetwork**.\n\nMessaging with notification push example\n-----------------------\n\nSame as with the standard messaging example, but when preparing your message:\n\n    SMSRequest smsRequest = new SMSRequest(SENDER, MESSAGE, DESTINATION);\n    // The url where the delivery notification will MESSAGE pushed:\n    smsRequest.setNotifyURL(NOTIFY_URL);\n\n\nWhen the delivery notification is pushed to your server as a HTTP POST request, you must process the body of the message with the following code:\n\n    DeliveryInfoNotification deliveryInfoNotification = smsClient.getSMSMessagingClient().convertJsonToDeliveryInfoNotification(JSON);\n\nSending message with language specific characters example\n-----------------------------------------------\n\nIf you want to send message with special characters, this is how you prepare your message:\n\n\tSMSRequest smsRequest = new SMSRequest(SENDER, MESSAGE, DESTINATION);\n    // Create Language object with specific language code, use single shift table and use locking shift table for specific language as parameters\n    Language language = new Language(LanguageCode.TR, true, false);\n    // Set language\n    smsRequest.setLanguage(language);\n\nCurrently supported languages (with their language codes) are: `Spanish - \"SP\"`, `Portuguese - \"PT\"`, `Turkish - \"TR\"`.\n\n\nNumber Context example\n-----------------------\n\nInitialize and login the data connection client:\n\n    Configuration configuration = new Configuration(USERNAME, PASSWORD);\n    SMSClient smsClient = new SMSClient(configuration);\n\n\nRetrieve the roaming status (Number Context):\n\n    Roaming roaming = smsClient.getHLRClient().queryHLR(DESTINATION);\n\n\nNumber Context with notification push example\n-----------------------\n\nSimilar to the previous example, but this time you must set the notification url where the result will be pushed:\n\n    smsClient.getHLRClient().queryHLR(DESTINATION, NOTIFY_URL);\n\n\nWhen the roaming status notification is pushed to your server as a HTTP POST request, you must process the body of the message with the following code:\n\n    RoamingNotification roamingNotification = smsClient.getHLRClient().convertJsonToHLRNotificationExample(JSON);\n\n\nRetrieve inbound messages example\n-----------------------\n\nWith the existing sms client (see the basic messaging example to see how to start it):\n\n    InboundSMSMessageList inboundSMSMessageList =  smsClient.getSMSMessagingClient().getInboundMessages();\n\n\nInbound message push example\n-----------------------\n\nThe subscription to recive inbound messages can be set up on our site.\nWhen the inbound message notification is pushed to your server as a HTTP POST request, you must process the body of the message with the following code:\n\n    InboundSMSMessageList inboundSMSMessageList = smsClient.getSMSMessagingClient().convertJsonToInboundSMSMessageNotificationExample(JSON);\n\n\nLicense\n-------\n\nThis library is licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfobip%2Foneapi-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finfobip%2Foneapi-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfobip%2Foneapi-java/lists"}