Independentsoft
- any library, any programming language
Home
Purchase
Support
Company
Contact
JGraph
>
Tutorial
> Create channel
The following example shows a request to create a standard channel.
import com.independentsoft.graph.GraphClient; import com.independentsoft.graph.GraphException; import com.independentsoft.graph.teams.Channel; public class Console { public static void main(String[] args) { try { GraphClient client = new GraphClient(); client.setClientId("63333333-209e-454e-b7bd-55a4d201270f"); client.setTenant("independentsoft.onmicrosoft.com"); client.setUsername("info@independentsoft.onmicrosoft.com"); client.setPassword("password"); Channel channel = new Channel(); channel.setDisplayName("Discussion"); channel.setDescription("This channel is where we debate all future plans"); Channel createdChannel = client.createChannel("b030d33a-ffdc-4dae-80d7-123456", channel); System.out.println("Id: " + createdChannel.getId()); } catch (GraphException e) { System.out.println(e.getCode()); System.out.println(e.getMessage()); e.printStackTrace(); } } }
Need help? Ask our developers:
Name*
Email*
Message*