{"id":25097236,"url":"https://github.com/messagemedia/webhooks-java-sdk","last_synced_at":"2025-07-14T19:43:09.686Z","repository":{"id":57726607,"uuid":"131947830","full_name":"messagemedia/webhooks-java-sdk","owner":"messagemedia","description":"MessageMedia Java SDK for webhooks","archived":false,"fork":false,"pushed_at":"2018-07-07T10:35:21.000Z","size":140,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-02T02:46:32.378Z","etag":null,"topics":["java","messagemedia","messaging","sms","sms-api","sms-client","sms-gateway","sms-messages","webhooks","webhooks-api"],"latest_commit_sha":null,"homepage":"https://developers.messagemedia.com/","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/messagemedia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-03T05:52:06.000Z","updated_at":"2021-04-09T19:52:30.000Z","dependencies_parsed_at":"2022-09-26T21:50:55.950Z","dependency_job_id":null,"html_url":"https://github.com/messagemedia/webhooks-java-sdk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/messagemedia/webhooks-java-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/messagemedia%2Fwebhooks-java-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/messagemedia%2Fwebhooks-java-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/messagemedia%2Fwebhooks-java-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/messagemedia%2Fwebhooks-java-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/messagemedia","download_url":"https://codeload.github.com/messagemedia/webhooks-java-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/messagemedia%2Fwebhooks-java-sdk/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264860525,"owners_count":23674684,"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":["java","messagemedia","messaging","sms","sms-api","sms-client","sms-gateway","sms-messages","webhooks","webhooks-api"],"created_at":"2025-02-07T17:30:49.714Z","updated_at":"2025-07-14T19:43:09.662Z","avatar_url":"https://github.com/messagemedia.png","language":"Java","readme":"# MessageMedia Webhooks Java SDK\n[![Travis Build Status](https://api.travis-ci.org/messagemedia/webhooks-java-sdk.svg?branch=master)](https://travis-ci.org/messagemedia/webhooks-java-sdk)\n[![Pull Requests Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)](http://makeapullrequest.com)\n[![maven](https://img.shields.io/maven-metadata/v/http/central.maven.org/maven2/com/messagemedia/sdk/webhooks/maven-metadata.xml.svg)](https://mvnrepository.com/artifact/com.messagemedia.sdk/webhooks)\n\nThe MessageMedia Webhooks allows you to subscribe to one or several events and when one of those events is triggered, an HTTP request is sent to the URL of your choice along with the message or payload. In simpler terms, it allows applications to \"speak\" to one another and get notified automatically when something new happens.\n\n![Webhooks Flow](http://i66.tinypic.com/2ufxf81.jpg)\n\n## Table of Contents\n* [Authentication](#closed_lock_with_key-authentication)\n* [Errors](#interrobang-errors)\n* [Information](#newspaper-information)\n  * [Slack and Mailing List](#slack-and-mailing-list)\n  * [Bug Reports](#bug-reports)\n  * [Contributing](#contributing)\n* [Installation](#star-installation)\n* [Get Started](#clapper-get-started)\n* [API Documentation](#closed_book-api-documentation)\n* [Need help?](#confused-need-help)\n* [License](#page_with_curl-license)\n\n## :closed_lock_with_key: Authentication\n\nAuthentication is done via API keys. Sign up at https://developers.messagemedia.com/register/ to get your API keys.\n\nRequests are authenticated using HTTP Basic Auth or HMAC. Provide your API key as the auth_user_name and API secret as the auth_password.\n\n## :interrobang: Errors\n\nOur API returns standard HTTP success or error status codes. For errors, we will also include extra information about what went wrong encoded in the response as JSON. The most common status codes are listed below.\n\n#### HTTP Status Codes\n\n| Code      | Title       | Description |\n|-----------|-------------|-------------|\n| 400 | Invalid Request | The request was invalid |\n| 401 | Unauthorized | Your API credentials are invalid |\n| 403 | Disabled feature | Feature not enabled |\n| 404 | Not Found |\tThe resource does not exist |\n| 50X | Internal Server Error | An error occurred with our API |\n\n## :newspaper: Information\n\n#### Slack and Mailing List\n\nIf you have any questions, comments, or concerns, please join our Slack channel:\nhttps://developers.messagemedia.com/collaborate/slack/\n\nAlternatively you can email us at:\ndevelopers@messagemedia.com\n\n#### Bug reports\n\nIf you discover a problem with the SDK, we would like to know about it. You can raise an [issue](https://github.com/messagemedia/signingkeys-nodejs-sdk/issues) or send an email to: developers@messagemedia.com\n\n#### Contributing\n\nWe welcome your thoughts on how we could best provide you with SDKs that would simplify how you consume our services in your application. You can fork and create pull requests for any features you would like to see or raise an [issue](https://github.com/messagemedia/signingkeys-nodejs-sdk/issues)\n\n## :star: Installation\nAt present the jars are available from a public maven repository.\n\nUse the following dependency in your project to grab via Maven:\n```\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.messagemedia.sdk\u003c/groupId\u003e\n    \u003cartifactId\u003ewebhooks\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n\n```\n\n## :clapper: Get Started\nIt's easy to get started. Simply enter the API Key and secret you obtained from the [MessageMedia Developers Portal](https://developers.messagemedia.com) into the code snippet below.\n\n### Create a webhook\n```java\nimport com.fasterxml.jackson.core.type.TypeReference;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.messagemedia.webhooks.MessageMediaWebhooksClient;\nimport com.messagemedia.webhooks.controllers.WebhooksController;\nimport com.messagemedia.webhooks.models.CreateWebhookRequest;\n\npublic class Main {\n\n    public static void main(String[] args) throws Throwable {\n        // Configuration parameters and credentials\n        String basicAuthUserName = \"API_KEY\"; // The username to use with basic authentication\n        String basicAuthPassword = \"API_SECRET\"; // The password to use with basic authentication\n\n        MessageMediaWebhooksClient client = new MessageMediaWebhooksClient(basicAuthUserName, basicAuthPassword);\n\n        WebhooksController webhooks = client.getWebhooks();\n\n        String bodyValue = \"{\\\"url\\\": \\\"https://webhook.com\\\",\" +\n                \"\\\"method\\\": \\\"POST\\\",\" +\n                \"\\\"encoding\\\": \\\"JSON\\\",\" +\n                \"\\\"events\\\": [ \\\"RECEIVED_SMS\\\" ],\" +\n                \"\\\"template\\\": \\\"{\\\\\\\"id\\\\\\\":\\\\\\\"$mtId\\\\\\\", \\\\\\\"status\\\\\\\":\\\\\\\"$statusCode\\\\\\\"}\\\"\" +\n                \"}\";\n\n        ObjectMapper mapper = new ObjectMapper();\n        CreateWebhookRequest body = mapper.readValue(bodyValue,new TypeReference\u003cCreateWebhookRequest\u003e(){});\n\n        webhooks.createWebhook(body);\n    }\n}\n\n```\n\n### Retrieve all webhooks\n```java\nimport com.fasterxml.jackson.core.type.TypeReference;\nimport com.messagemedia.webhooks.MessageMediaWebhooksClient;\nimport com.messagemedia.webhooks.controllers.WebhooksController;\n\npublic class Main {\n\n    public static void main(String[] args) throws Throwable {\n        // Configuration parameters and credentials\n        String basicAuthUserName = \"API_KEY\"; // The username to use with basic authentication\n        String basicAuthPassword = \"API_SECRET\"; // The password to use with basic authentication\n\n        MessageMediaWebhooksClient client = new MessageMediaWebhooksClient(basicAuthUserName, basicAuthPassword);\n\n        WebhooksController webhooks = client.getWebhooks();\n\n        Integer page = 0;\n        Integer pageSize = 0;\n\n        String result = (webhooks.retrieveWebhook(page, pageSize).parseAsString());\n        System.out.print(result);\n    }\n}\n\n```\n\n### Update a webhook\nYou can get a webhook ID by looking at the `id` of each webhook created from the response of the above example.\n```java\nimport com.fasterxml.jackson.core.type.TypeReference;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.messagemedia.webhooks.MessageMediaWebhooksClient;\nimport com.messagemedia.webhooks.controllers.WebhooksController;\nimport com.messagemedia.webhooks.models.UpdateWebhookRequest;\n\npublic class Main {\n\n    public static void main(String[] args) throws Throwable {\n        // Configuration parameters and credentials\n        String basicAuthUserName = \"API_KEY\"; // The username to use with basic authentication\n        String basicAuthPassword = \"API_SECRET\"; // The password to use with basic authentication\n\n        MessageMediaWebhooksClient client = new MessageMediaWebhooksClient(basicAuthUserName, basicAuthPassword);\n\n        WebhooksController webhooks = client.getWebhooks();\n\n        String webhookId = \"WEBHOOK_ID\";\n\n        String bodyValue = \"{\\\"url\\\": \\\"https://myurl.com\\\",\" +\n                \"\\\"method\\\": \\\"POST\\\",\" +\n                \"\\\"encoding\\\": \\\"JSON\\\",\" +\n                \"\\\"events\\\": [ \\\"ENROUTE_DR\\\" ],\" +\n                \"\\\"template\\\": \\\"{\\\\\\\"id\\\\\\\":\\\\\\\"$mtId\\\\\\\", \\\\\\\"status\\\\\\\":\\\\\\\"$statusCode\\\\\\\"}\\\"\" +\n                \"}\";\n\n        ObjectMapper mapper = new ObjectMapper();\n        UpdateWebhookRequest body = mapper.readValue(bodyValue,new TypeReference\u003cUpdateWebhookRequest\u003e(){});\n\n        webhooks.updateWebhook(webhookId, body);\n    }\n}\n\n```\n\n### Delete a webhook\nYou can get a webhook ID by looking at the `id` of each webhook created from the response of the retrieve webhooks example.\n```java\nimport com.fasterxml.jackson.core.type.TypeReference;\nimport com.messagemedia.webhooks.MessageMediaWebhooksClient;\nimport com.messagemedia.webhooks.controllers.WebhooksController;\n\npublic class Main {\n\n    public static void main(String[] args) throws Throwable {\n        // Configuration parameters and credentials\n        String basicAuthUserName = \"API_KEY\"; // The username to use with basic authentication\n        String basicAuthPassword = \"API_SECRET\"; // The password to use with basic authentication\n\n        MessageMediaWebhooksClient client = new MessageMediaWebhooksClient(basicAuthUserName, basicAuthPassword);\n\n        WebhooksController webhooks = client.getWebhooks();\n\n        String webhookId = \"WEBHOOK_ID\";\n\n        webhooks.deleteWebhook(webhookId);\n    }\n}\n\n```\n\n## :closed_book: API Reference Documentation\nCheck out the [full API documentation](https://developers.messagemedia.com/code/webhooks-api-documentation/) for more detailed information.\n\n## :confused: Need help?\nPlease contact developer support at developers@messagemedia.com or check out the developer portal at [developers.messagemedia.com](https://developers.messagemedia.com/)\n\n## :page_with_curl: License\nApache License. See the [LICENSE](LICENSE) file.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmessagemedia%2Fwebhooks-java-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmessagemedia%2Fwebhooks-java-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmessagemedia%2Fwebhooks-java-sdk/lists"}