{"id":"5553a8ce-941b-45dc-ab18-e36c780ad7bd","shortId":"62VBYc","kind":"skill","title":"azure-communication-sms-java","tagline":"Send SMS messages with Azure Communication Services SMS Java SDK. Use when implementing SMS notifications, alerts, OTP delivery, bulk messaging, or delivery reports.","description":"# Azure Communication SMS (Java)\n\nSend SMS messages to single or multiple recipients with delivery reporting.\n\n## Installation\n\n```xml\n<dependency>\n    <groupId>com.azure</groupId>\n    <artifactId>azure-communication-sms</artifactId>\n    <version>1.2.0</version>\n</dependency>\n```\n\n## Client Creation\n\n```java\nimport com.azure.communication.sms.SmsClient;\nimport com.azure.communication.sms.SmsClientBuilder;\nimport com.azure.identity.DefaultAzureCredentialBuilder;\n\n// With DefaultAzureCredential (recommended)\nSmsClient smsClient = new SmsClientBuilder()\n    .endpoint(\"https://<resource>.communication.azure.com\")\n    .credential(new DefaultAzureCredentialBuilder().build())\n    .buildClient();\n\n// With connection string\nSmsClient smsClient = new SmsClientBuilder()\n    .connectionString(\"<connection-string>\")\n    .buildClient();\n\n// With AzureKeyCredential\nimport com.azure.core.credential.AzureKeyCredential;\n\nSmsClient smsClient = new SmsClientBuilder()\n    .endpoint(\"https://<resource>.communication.azure.com\")\n    .credential(new AzureKeyCredential(\"<access-key>\"))\n    .buildClient();\n\n// Async client\nSmsAsyncClient smsAsyncClient = new SmsClientBuilder()\n    .connectionString(\"<connection-string>\")\n    .buildAsyncClient();\n```\n\n## Send SMS to Single Recipient\n\n```java\nimport com.azure.communication.sms.models.SmsSendResult;\n\n// Simple send\nSmsSendResult result = smsClient.send(\n    \"+14255550100\",      // From (your ACS phone number)\n    \"+14255551234\",      // To\n    \"Your verification code is 123456\");\n\nSystem.out.println(\"Message ID: \" + result.getMessageId());\nSystem.out.println(\"To: \" + result.getTo());\nSystem.out.println(\"Success: \" + result.isSuccessful());\n\nif (!result.isSuccessful()) {\n    System.out.println(\"Error: \" + result.getErrorMessage());\n    System.out.println(\"Status: \" + result.getHttpStatusCode());\n}\n```\n\n## Send SMS to Multiple Recipients\n\n```java\nimport com.azure.communication.sms.models.SmsSendOptions;\nimport java.util.Arrays;\nimport java.util.List;\n\nList<String> recipients = Arrays.asList(\n    \"+14255551111\",\n    \"+14255552222\",\n    \"+14255553333\"\n);\n\n// With options\nSmsSendOptions options = new SmsSendOptions()\n    .setDeliveryReportEnabled(true)\n    .setTag(\"marketing-campaign-001\");\n\nIterable<SmsSendResult> results = smsClient.sendWithResponse(\n    \"+14255550100\",      // From\n    recipients,          // To list\n    \"Flash sale! 50% off today only.\",\n    options,\n    Context.NONE\n).getValue();\n\nfor (SmsSendResult result : results) {\n    if (result.isSuccessful()) {\n        System.out.println(\"Sent to \" + result.getTo() + \": \" + result.getMessageId());\n    } else {\n        System.out.println(\"Failed to \" + result.getTo() + \": \" + result.getErrorMessage());\n    }\n}\n```\n\n## Send Options\n\n```java\nSmsSendOptions options = new SmsSendOptions();\n\n// Enable delivery reports (sent via Event Grid)\noptions.setDeliveryReportEnabled(true);\n\n// Add custom tag for tracking\noptions.setTag(\"order-confirmation-12345\");\n```\n\n## Response Handling\n\n```java\nimport com.azure.core.http.rest.Response;\n\nResponse<Iterable<SmsSendResult>> response = smsClient.sendWithResponse(\n    \"+14255550100\",\n    Arrays.asList(\"+14255551234\"),\n    \"Hello!\",\n    new SmsSendOptions().setDeliveryReportEnabled(true),\n    Context.NONE\n);\n\n// Check HTTP response\nSystem.out.println(\"Status code: \" + response.getStatusCode());\nSystem.out.println(\"Headers: \" + response.getHeaders());\n\n// Process results\nfor (SmsSendResult result : response.getValue()) {\n    System.out.println(\"Message ID: \" + result.getMessageId());\n    System.out.println(\"Successful: \" + result.isSuccessful());\n    \n    if (!result.isSuccessful()) {\n        System.out.println(\"HTTP Status: \" + result.getHttpStatusCode());\n        System.out.println(\"Error: \" + result.getErrorMessage());\n    }\n}\n```\n\n## Async Operations\n\n```java\nimport reactor.core.publisher.Mono;\n\nSmsAsyncClient asyncClient = new SmsClientBuilder()\n    .connectionString(\"<connection-string>\")\n    .buildAsyncClient();\n\n// Send single message\nasyncClient.send(\"+14255550100\", \"+14255551234\", \"Async message!\")\n    .subscribe(\n        result -> System.out.println(\"Sent: \" + result.getMessageId()),\n        error -> System.out.println(\"Error: \" + error.getMessage())\n    );\n\n// Send to multiple with options\nSmsSendOptions options = new SmsSendOptions()\n    .setDeliveryReportEnabled(true);\n\nasyncClient.sendWithResponse(\n    \"+14255550100\",\n    Arrays.asList(\"+14255551111\", \"+14255552222\"),\n    \"Bulk async message\",\n    options)\n    .subscribe(response -> {\n        for (SmsSendResult result : response.getValue()) {\n            System.out.println(\"Result: \" + result.getTo() + \" - \" + result.isSuccessful());\n        }\n    });\n```\n\n## Error Handling\n\n```java\nimport com.azure.core.exception.HttpResponseException;\n\ntry {\n    SmsSendResult result = smsClient.send(\n        \"+14255550100\",\n        \"+14255551234\",\n        \"Test message\"\n    );\n    \n    // Individual message errors don't throw exceptions\n    if (!result.isSuccessful()) {\n        handleMessageError(result);\n    }\n    \n} catch (HttpResponseException e) {\n    // Request-level failures (auth, network, etc.)\n    System.out.println(\"Request failed: \" + e.getMessage());\n    System.out.println(\"Status: \" + e.getResponse().getStatusCode());\n} catch (RuntimeException e) {\n    System.out.println(\"Unexpected error: \" + e.getMessage());\n}\n\nprivate void handleMessageError(SmsSendResult result) {\n    int status = result.getHttpStatusCode();\n    String error = result.getErrorMessage();\n    \n    if (status == 400) {\n        System.out.println(\"Invalid phone number: \" + result.getTo());\n    } else if (status == 429) {\n        System.out.println(\"Rate limited - retry later\");\n    } else {\n        System.out.println(\"Error \" + status + \": \" + error);\n    }\n}\n```\n\n## Delivery Reports\n\nDelivery reports are sent via Azure Event Grid. Configure an Event Grid subscription for your ACS resource.\n\n```java\n// Event Grid webhook handler (in your endpoint)\npublic void handleDeliveryReport(String eventJson) {\n    // Parse Event Grid event\n    // Event type: Microsoft.Communication.SMSDeliveryReportReceived\n    \n    // Event data contains:\n    // - messageId: correlates to SmsSendResult.getMessageId()\n    // - from: sender number\n    // - to: recipient number\n    // - deliveryStatus: \"Delivered\", \"Failed\", etc.\n    // - deliveryStatusDetails: detailed status\n    // - receivedTimestamp: when status was received\n    // - tag: your custom tag from SmsSendOptions\n}\n```\n\n## SmsSendResult Properties\n\n| Property | Type | Description |\n|----------|------|-------------|\n| `getMessageId()` | String | Unique message identifier |\n| `getTo()` | String | Recipient phone number |\n| `isSuccessful()` | boolean | Whether send succeeded |\n| `getHttpStatusCode()` | int | HTTP status for this recipient |\n| `getErrorMessage()` | String | Error details if failed |\n| `getRepeatabilityResult()` | RepeatabilityResult | Idempotency result |\n\n## Environment Variables\n\n```bash\nAZURE_COMMUNICATION_ENDPOINT=https://<resource>.communication.azure.com\nAZURE_COMMUNICATION_CONNECTION_STRING=endpoint=https://...;accesskey=...\nSMS_FROM_NUMBER=+14255550100\n```\n\n## Best Practices\n\n1. **Phone Number Format** - Use E.164 format: `+[country code][number]`\n2. **Delivery Reports** - Enable for critical messages (OTP, alerts)\n3. **Tagging** - Use tags to correlate messages with business context\n4. **Error Handling** - Check `isSuccessful()` for each recipient individually\n5. **Rate Limiting** - Implement retry with backoff for 429 responses\n6. **Bulk Sending** - Use batch send for multiple recipients (more efficient)\n\n## Trigger Phrases\n\n- \"send SMS Java\", \"text message Java\"\n- \"SMS notification\", \"OTP SMS\", \"bulk SMS\"\n- \"delivery report SMS\", \"Azure Communication Services SMS\"\n\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.","tags":["azure","communication","sms","java","antigravity","awesome","skills","sickn33","agent-skills","agentic-skills","ai-agent-skills","ai-agents"],"capabilities":["skill","source-sickn33","skill-azure-communication-sms-java","topic-agent-skills","topic-agentic-skills","topic-ai-agent-skills","topic-ai-agents","topic-ai-coding","topic-ai-workflows","topic-antigravity","topic-antigravity-skills","topic-claude-code","topic-claude-code-skills","topic-codex-cli","topic-codex-skills"],"categories":["antigravity-awesome-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/sickn33/antigravity-awesome-skills/azure-communication-sms-java","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add sickn33/antigravity-awesome-skills","source_repo":"https://github.com/sickn33/antigravity-awesome-skills","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 34928 github stars · SKILL.md body (8,229 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-24T18:50:29.532Z","embedding":null,"createdAt":"2026-04-18T21:32:14.749Z","updatedAt":"2026-04-24T18:50:29.532Z","lastSeenAt":"2026-04-24T18:50:29.532Z","tsv":"'+14255550100':119,184,250,306,331,358,554 '+14255551111':165,333 '+14255551234':125,252,307,359 '+14255552222':166,334 '+14255553333':167 '001':180 '1':557 '1.2.0':51 '12345':240 '123456':131 '2':567 '3':576 '4':586 '400':411 '429':420,603 '5':595 '50':191 '6':605 'ac':122,448 'accesskey':550 'action':649 'add':231 'alert':21,575 'applic':643 'arrays.aslist':164,251,332 'ask':687 'async':98,291,308,336 'asynccli':297 'asyncclient.send':305 'asyncclient.sendwithresponse':330 'auth':380 'azur':2,10,29,48,438,541,545,633 'azure-communication-sm':47 'azure-communication-sms-java':1 'azurekeycredenti':85,96 'backoff':601 'bash':540 'batch':609 'best':555 'boolean':517 'boundari':695 'build':73 'buildasynccli':105,301 'buildclient':74,83,97 'bulk':24,335,606,628 'busi':584 'campaign':179 'catch':373,391 'check':259,589 'clarif':689 'clear':662 'client':52,99 'code':129,264,565 'com.azure':46 'com.azure.communication.sms.models.smssendoptions':157 'com.azure.communication.sms.models.smssendresult':113 'com.azure.communication.sms.smsclient':56 'com.azure.communication.sms.smsclientbuilder':58 'com.azure.core.credential.azurekeycredential':87 'com.azure.core.exception.httpresponseexception':353 'com.azure.core.http.rest.response':245 'com.azure.identity.defaultazurecredentialbuilder':60 'communic':3,11,30,49,542,546,634 'communication.azure.com':69,93,544 'configur':441 'confirm':239 'connect':76,547 'connectionstr':82,104,300 'contain':472 'context':585 'context.none':196,258 'correl':474,581 'countri':564 'creation':53 'credenti':70,94 'criteria':698 'critic':572 'custom':232,497 'data':471 'defaultazurecredenti':62 'defaultazurecredentialbuild':72 'deliv':484 'deliveri':23,27,42,223,431,433,568,630 'deliverystatus':483 'deliverystatusdetail':487 'describ':650,666 'descript':505 'detail':488,531 'e':375,393 'e.164':562 'e.getmessage':386,397 'e.getresponse':389 'effici':615 'els':209,417,426 'enabl':222,570 'endpoint':68,92,457,543,549 'environ':538,678 'environment-specif':677 'error':145,289,315,317,349,364,396,407,428,430,530,587 'error.getmessage':318 'etc':382,486 'event':227,439,443,451,464,466,467,470 'eventjson':462 'except':368 'execut':645 'expert':683 'fail':211,385,485,533 'failur':379 'flash':189 'format':560,563 'geterrormessag':528 'gethttpstatuscod':521 'getmessageid':506 'getrepeatabilityresult':534 'getstatuscod':390 'getto':511 'getvalu':197 'grid':228,440,444,452,465 'handl':242,350,588 'handledeliveryreport':460 'handlemessageerror':371,400 'handler':454 'header':267 'hello':253 'http':260,285,523 'httpresponseexcept':374 'id':134,277 'idempot':536 'identifi':510 'implement':18,598 'import':55,57,59,86,112,156,158,160,244,294,352 'individu':362,594 'input':692 'instal':44 'int':403,522 'invalid':413 'issuccess':516,590 'iter':181,247 'java':5,14,32,54,111,155,217,243,293,351,450,620,623 'java.util.arrays':159 'java.util.list':161 'later':425 'level':378 'limit':423,597,654 'list':162,188 'market':178 'marketing-campaign':177 'match':663 'messag':8,25,35,133,276,304,309,337,361,363,509,573,582,622 'messageid':473 'microsoft.communication.smsdeliveryreportreceived':469 'miss':700 'multipl':39,153,321,612 'network':381 'new':66,71,80,90,95,102,172,220,254,298,326 'notif':20,625 'number':124,415,479,482,515,553,559,566 'oper':292 'option':169,171,195,216,219,323,325,338 'options.setdeliveryreportenabled':229 'options.settag':236 'order':238 'order-confirm':237 'otp':22,574,626 'output':672 'overview':653 'pars':463 'permiss':693 'phone':123,414,514,558 'phrase':617 'practic':556 'privat':398 'process':269 'properti':502,503 'public':458 'rate':422,596 'reactor.core.publisher.mono':295 'receiv':494 'receivedtimestamp':490 'recipi':40,110,154,163,186,481,513,527,593,613 'recommend':63 'repeatabilityresult':535 'report':28,43,224,432,434,569,631 'request':377,384 'request-level':376 'requir':691 'resourc':449 'respons':241,246,248,261,340,604 'response.getheaders':268 'response.getstatuscode':265 'response.getvalue':274,344 'result':117,182,200,201,270,273,311,343,346,356,372,402,537 'result.geterrormessage':146,214,290,408 'result.gethttpstatuscode':149,287,405 'result.getmessageid':135,208,278,314 'result.getto':138,207,213,347,416 'result.issuccessful':141,143,203,281,283,348,370 'retri':424,599 'review':684 'runtimeexcept':392 'safeti':694 'sale':190 'scope':665 'sdk':15 'send':6,33,106,115,150,215,302,319,519,607,610,618 'sender':478 'sent':205,225,313,436 'servic':12,635 'setdeliveryreporten':174,256,328 'settag':176 'simpl':114 'singl':37,109,303 'skill':641,657 'skill-azure-communication-sms-java' 'sms':4,7,13,19,31,34,50,107,151,551,619,624,627,629,632,636 'smsasynccli':100,101,296 'smsclient':64,65,78,79,88,89 'smsclient.send':118,357 'smsclient.sendwithresponse':183,249 'smsclientbuild':67,81,91,103,299 'smssendopt':170,173,218,221,255,324,327,500 'smssendresult':116,199,272,342,355,401,501 'smssendresult.getmessageid':476 'source-sickn33' 'specif':679 'status':148,263,286,388,404,410,419,429,489,492,524 'stop':685 'string':77,406,461,507,512,529,548 'subscrib':310,339 'subscript':445 'substitut':675 'succeed':520 'success':140,280,697 'system.out.println':132,136,139,144,147,204,210,262,266,275,279,284,288,312,316,345,383,387,394,412,421,427 'tag':233,495,498,577,579 'task':661 'test':360,681 'text':621 'throw':367 'today':193 'topic-agent-skills' 'topic-agentic-skills' 'topic-ai-agent-skills' 'topic-ai-agents' 'topic-ai-coding' 'topic-ai-workflows' 'topic-antigravity' 'topic-antigravity-skills' 'topic-claude-code' 'topic-claude-code-skills' 'topic-codex-cli' 'topic-codex-skills' 'track':235 'treat':670 'tri':354 'trigger':616 'true':175,230,257,329 'type':468,504 'unexpect':395 'uniqu':508 'use':16,561,578,608,639,655 'valid':680 'variabl':539 'verif':128 'via':226,437 'void':399,459 'webhook':453 'whether':518 'workflow':647 'xml':45","prices":[{"id":"8f3485c2-1dc2-464c-9fca-85686f8ba559","listingId":"5553a8ce-941b-45dc-ab18-e36c780ad7bd","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"sickn33","category":"antigravity-awesome-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T21:32:14.749Z"}],"sources":[{"listingId":"5553a8ce-941b-45dc-ab18-e36c780ad7bd","source":"github","sourceId":"sickn33/antigravity-awesome-skills/azure-communication-sms-java","sourceUrl":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/azure-communication-sms-java","isPrimary":false,"firstSeenAt":"2026-04-18T21:32:14.749Z","lastSeenAt":"2026-04-24T18:50:29.532Z"}],"details":{"listingId":"5553a8ce-941b-45dc-ab18-e36c780ad7bd","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"sickn33","slug":"azure-communication-sms-java","github":{"repo":"sickn33/antigravity-awesome-skills","stars":34928,"topics":["agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows","antigravity","antigravity-skills","claude-code","claude-code-skills","codex-cli","codex-skills","cursor","cursor-skills","developer-tools","gemini-cli","gemini-skills","kiro","mcp","skill-library"],"license":"mit","html_url":"https://github.com/sickn33/antigravity-awesome-skills","pushed_at":"2026-04-24T06:41:17Z","description":"Installable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.","skill_md_sha":"e76da6b8dc68fdc9134c68f2506b45989c198e46","skill_md_path":"skills/azure-communication-sms-java/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/azure-communication-sms-java"},"layout":"multi","source":"github","category":"antigravity-awesome-skills","frontmatter":{"name":"azure-communication-sms-java","description":"Send SMS messages with Azure Communication Services SMS Java SDK. Use when implementing SMS notifications, alerts, OTP delivery, bulk messaging, or delivery reports."},"skills_sh_url":"https://skills.sh/sickn33/antigravity-awesome-skills/azure-communication-sms-java"},"updatedAt":"2026-04-24T18:50:29.532Z"}}