Add service_account.json and/or client_secrets.json to the current
folder depending on the credentials used by the samples to run:
-
service_account.jsonfor app credentials -
client_secrets.jsonfor user credentials
Execute
mvn exec:java -Dexec.mainClass="replace.with.the.sample.mainClass"
wih the main class of the sample.
For example, to run the sample CreateMessageAppCred, run
mvn exec:java -Dexec.mainClass="com.google.workspace.api.chat.samples.CreateMessageAppCred".
Execute gradle run after setting the main class of the sample in the build.gradle file.
For example, to run the sample CreateMessageAppCred, use
com.google.workspace.api.chat.samples.CreateMessageAppCred.