{"id":13764425,"url":"https://github.com/webex/webex-java-sdk","last_synced_at":"2025-08-18T15:05:02.167Z","repository":{"id":43798968,"uuid":"47515749","full_name":"webex/webex-java-sdk","owner":"webex","description":"Java library for consuming RESTful APIs for Cisco Spark","archived":false,"fork":false,"pushed_at":"2021-10-19T17:38:34.000Z","size":99,"stargazers_count":67,"open_issues_count":3,"forks_count":75,"subscribers_count":53,"default_branch":"master","last_synced_at":"2025-05-19T01:38:50.682Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2015-12-06T22:05:23.000Z","updated_at":"2024-10-01T12:42:43.000Z","dependencies_parsed_at":"2022-08-28T14:41:01.090Z","dependency_job_id":null,"html_url":"https://github.com/webex/webex-java-sdk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/webex/webex-java-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webex%2Fwebex-java-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webex%2Fwebex-java-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webex%2Fwebex-java-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webex%2Fwebex-java-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webex","download_url":"https://codeload.github.com/webex/webex-java-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webex%2Fwebex-java-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271011782,"owners_count":24684409,"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","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-08-03T16:00:20.390Z","updated_at":"2025-08-18T15:05:02.134Z","avatar_url":"https://github.com/webex.png","language":"Java","funding_links":[],"categories":["Client SDKs"],"sub_categories":["REST API clients"],"readme":"\u003ch1 align=\"center\"\u003e\n    \u003ca href=\"developer.webex.com\"\u003e\u003cimg src=\"https://www.webex.com/content/dam/wbx/us/images/offer/plans_2-2.png\"/\u003e\u003c/a\u003e\n    \u003cbr/\u003e\n    \u003ca href=\"developer.webex.com\"\u003espark-java-sdk\u003c/a\u003e\n\u003c/h1\u003e\n\n[![license](https://img.shields.io/github/license/ciscospark/spark-java-sdk.svg)](https://github.com/ciscospark/spark-java-sdk/blob/master/LICENSE)\n\n## Introduction\n\nThis Java SDK is a Java library for consuming Cisco Webex's RESTful APIs. Please visit us at https://developer.webex.com/ for more information about Cisco Webex for Developers.\n\n_Why spark-java-sdk?_ : A rebranding took place in 2018, some time after this SDK was created, that renamed Cisco Spark to Cisco Webex.\n\n## Prerequisites\n\n- Java 1.8\n- [Apache Maven](https://maven.apache.org/)\n\nClone the repository\n```bash\ngit clone git@github.com:webex/spark-java-sdk.git\n```\nRun maven through CLI or your favourite IDE\n```bash\nmvn install\n```\n\n## Usage\n\nTo start, call the _Spark_ builder with your developer token (can be retrieved from https://developer.webex.com).\n```java\nString accessToken = \"\u003c\u003csecret\u003e\u003e\";\n\nSpark spark = Spark.builder()\n        .baseUrl(URI.create(\"https://api.ciscospark.com/v1\"))\n        .accessToken(accessToken)\n        .build();\n``` \n\nWork with Webex Teams rooms\n```java\n// List my rooms\nspark.rooms()\n        .iterate()\n        .forEachRemaining(room -\u003e {\n            System.out.println(room.getTitle() + \", created \" + room.getCreated() + \": \" + room.getId());\n        });\n\n\n// Create a new room\nRoom room = new Room();\nroom.setTitle(\"Hello World\");\nroom = spark.rooms().post(room);\n\n\n// Add a coworker to the room\nMembership membership = new Membership();\nmembership.setRoomId(room.getId());\nmembership.setPersonEmail(\"wile_e_coyote@acme.com\");\nspark.memberships().post(membership);\n\n\n// List the members of the room\nspark.memberships()\n        .queryParam(\"roomId\", room.getId())\n        .iterate()\n        .forEachRemaining(member -\u003e {\n            System.out.println(member.getPersonEmail());\n        });\n\n\n// Post a text message to the room\nMessage message = new Message();\nmessage.setRoomId(room.getId());\nmessage.setText(\"Hello World!\");\nspark.messages().post(message);\n\n\n// Share a file with the room\nmessage = new Message();\nmessage.setRoomId(room.getId());\nmessage.setFiles(URI.create(\"http://example.com/hello_world.jpg\"));\nspark.messages().post(message);\n\n// Share an adaptive card with the room\nmessage = new Message();\nmessage.setRoomId(room.getId());\nmessage.setText(\"Mandatory fallback text\");\nJsonArray attachmentsArry = Json.createArrayBuilder() // Create an array to contain all the adaptive card JSONs\n                .add(Json.createObjectBuilder() // Add the required key \"contentType\" which points to the fact that this attachment is of type adatpive card\n                        .add(\"contentType\", \"application/vnd.microsoft.card.adaptive\") // The content key will contain the actual card JSON generated from the adaptive cards designer\n                        .add(\"content\", Json.createObjectBuilder()\n                                .add(\"$schema\", \"http://adaptivecards.io/schemas/adaptive-card.json\")\n                                .add(\"type\", \"AdaptiveCard\")\n                                .add(\"version\", \"1.0\")\n                                .add(\"body\", Json.createArrayBuilder() // Create the initital body object of the card\n                                        .add(Json.createObjectBuilder() // Create an object/element inside the body\n                                                .add(\"type\", \"TextBlock\") // This is an example of TextBlock element\n                                                .add(\"text\", \"Here is a ninja cat\")\n                                                .build() // Build the object\n                                        )\n                                        .add(Json.createObjectBuilder()\n                                                .add(\"type\", \"Image\") // This is an example of Image element\n                                                .add(\"url\", \"http://adaptivecards.io/content/cats/1.png\")\n                                                .build() // Build the image element\n                                        )\n                                        .build() // Build the body object\n                                )\n                                .build() // Build the card JSON\n                        ))\n                .build(); // Build the entire attachments array\nmessage.setAttachments(attachmentsArry); // Set the attachments field on the message payload which has to be an array of JSON\nspark.messages().post(message);\n\n// Get person details\nPerson person=new Person();\nperson=spark.people().path(\"/\u003c\u003c\u003c**Insert PersonId**\u003e\u003e\u003e\").get();\n```\nConnect to Webex Teams via webhooks\n```java\n// Create a new webhook\nWebhook webhook = new Webhook();\nwebhook.setName(\"My Webhook\");\nwebhook.setResource(\"messages\");\nwebhook.setEvent(\"created\");\nwebhook.setFilter(\"mentionedPeople=me\");\nwebhook.setSecret(\"SOMESECRET\");\nwebhook.setTargetUrl(URI.create(\"http://www.example.com/webhook\"));\nwebhook=spark.webhooks().post(webhook);\n\n// List webhooks\nspark.webhooks().iterate().forEachRemaining(hook -\u003e {\n    System.out.println(hook.getId() + \": \" + hook.getName() + \" (\" + hook.getTargetUrl() + \")\" + \" Secret - \" + hook.getSecret());\n});\n\n// Delete a webhook\nwebhook=spark.webhooks().path(\"/\u003c\u003c\u003c**Insert WebhookId**\u003e\u003e\u003e\").delete();\n```\nFind all your relevant information through our APIs\n```java\n// List people in the organization\nspark.people().iterate().forEachRemaining(ppl -\u003e {\nSystem.out.println(ppl.getId() + \": \" + ppl.getDisplayName()+\" : Creation: \"+ppl.getCreated());\n});\n\n// Get organizations\nspark.organizations().iterate().forEachRemaining(org -\u003e {\nSystem.out.println(org.getId() + \": \" + org.getDisplayName()+\" : Creation: \"+org.getCreated());\n});\n\n// Get licenses\nspark.licenses().iterate().forEachRemaining(license -\u003e {\nSystem.out.println(\"GET Licenses \" +license.getId() + \": DisplayName:- \" + license.getDisplayName()+\" : totalUnits:         \"+Integer.toString(license.getTotalUnits())+\" : consumedUnits: \"+Integer.toString(license.getConsumedUnits()));\n});\n\n// Get roles\nspark.roles().iterate().forEachRemaining(role -\u003e {\nSystem.out.println(\"GET Roles \" +role.getId() + \": Name:- \" + role.getName());\n});\n```\nWork directly with your teams\n```java\n// Create a new team\nTeam team = new Team();\nteam.setName(\"Brand New Team\");\nteam = spark.teams().post(team);\n\n// Add a coworker to the team\nTeamMembership teamMembership = new TeamMembership();\nteamMembership.setTeamId(team.getId());\nteamMembership.setPersonEmail(\"wile_e_coyote@acme.com\");\nspark.teamMemberships().post(teamMembership);\n\n// List the members of the team\nspark.teamMemberships()\n        .queryParam(\"teamId\", team.getId())\n        .iterate()\n        .forEachRemaining(member -\u003e {\n            System.out.println(member.getPersonEmail());\n        });\n\n```\n\n## Contributing\n\n## Maintainers\n\n- Brian (bbender)\n- Santosh (santokum)\n\n## License\n\n\u0026copy; 2018 Cisco Systems, Inc. and/or its affiliates. All Rights Reserved. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebex%2Fwebex-java-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebex%2Fwebex-java-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebex%2Fwebex-java-sdk/lists"}