Reputation
Badges 2
Editor NewbieHi,
The Search Rooms request is used to find rooms containing a particular query
string. Where the search query
is used to reference room names or room descriptions. More information on this endpoint cn be found here https://developers.symphony.com/restapi/reference/search-rooms-v3
The endpoint you would need to use to query all the streams a user is a member of would be the following, https://developers.symphony.com/restapi/reference/list-user-streams
However this will only retu...
Hi Kunaal,
Here is another example using Java Spring Boot
public class EchoActivity {
@Autowired
private MessageService messageService;
@Autowired
private StreamService streamService;
@Slash("/echo {argument}")
public void echo(CommandContext context, String argument) {
V2StreamAttributes Stream = streamService.getStream(context.getStreamId());
log.info(Stream.toString());
this.messageService.send(context.getStreamId(), "Received argument: " +...
Hi Kunaal,
For this use case you can leverage message templating.
Our Poll Bot implementation uses a data object which contains answers to a poll, which is a list of strings, https://github.com/SymphonyPlatformSolutions/symphony-poll-bot-java/blob/main/src/main/java/com/symphony/devrel/pollbot/command/CreatePollFormReply.java#L145-L152
// Construct poll form and blast to audience
Map<String, ?> data = Map.of("data", PollBlastData.builder()
.id(poll...
Hi Kunaal,
Here is an example for Java. Note. the class names are usually similar between our Python and Java BDK's.
@Slf4j
public class Example {
public static final String STREAM_ID = "MY_STRING_UD";
public static void main(String[] args) throws Exception {
// Create BDK entry point
final SymphonyBdk bdk = new SymphonyBdk(loadFromClasspath("/config.yaml"));
// Get stream details
StreamService streams = bdk.streams();
V2StreamAttributes strea...
Hi Kunaal,
You can obtain information about a stream using the Stream Info endpoint.
Here is an example of how it can be used with the Python BDK
async def help_command(self, context: CommandContext):
room = await self.bdk.streams().get_stream(context.stream_id)
logging.debug(room)
return await self._messages.send_message(context.stream_id, "<messageML>Help command triggered</messageML>")
The ...
Hi Kunaal,
Symphony Elements enables developers to create forms with a variety of data input types for capturing information from an end user. One of those is check boxes.
Here is an example here:
The MessageML to create that is shown below.
<messageML>
<form id="form_id">
<checkbox name="id1" value="value01" checked="true">Red</checkbox>
<checkbox name...
Hi George,
Thank you for the question.
So the behaviour you are seeing is highlighted here in this known limitation, https://docs.developers.symphony.com/building-bots-on-symphony/messages/overview-of-messageml/symphony-elements-1#known-limitations
So there are a couple of options to address this which are detailed below.
Option 1.
To ensure forms are not re-submitted you would need to store the 'form-id' and the userId values in a datastore. Your bot application can then determin...
Here is a full example which may help also referenced from the same page shared previously.
from symphony.bdk.core.activity.command import CommandContext
from symphony.bdk.core.config.loader import BdkConfigLoader
from symphony.bdk.core.symphony_bdk import SymphonyBdk
async def run():
async with SymphonyBdk(BdkConfigLoader.load_from_symphony_dir("config.yaml")) as bdk:
activities = bdk.activities()
messages = bdk.messages()
@activities.sl...
Hi Imad,
This is due to the /tokens endpoint calling the validateTokens method, which searches the tokensRepository for the requested appToken and checks if it matches the value of the symphonyToken.
https://github.com/finos/symphony-bdk-java/blob/main/symphony-bdk-core/src/main/java/com/symphony/bdk/core/auth/impl/AbstractExtensionAppAuthenticator.java#L48-L49
The default implementation of the tokensRepository uses an InMemoryTokensRepository, so by running multiple instances round rob...
So below is an example in Python on how your bot can extract arguments from a Symphony chat message.
@activities.slash("/echo {first_string_argument} {second_string_argument}")
async def on_echo_string_arguments(context: CommandContext):
#Get string argument with get_string
first_string_argument = context.arguments.get_string("first_string_argument")
# Get string argument with get_as_string
second_string_argument = context.arguments.get_as_string("second_string_argument")
me...
Hi, we currently dont have a dedicated course for building Extension Applications on Symphony. However this is something that could change in the future.
In the meantime we do have our Developer Guide documentation which walks you through how to create an Extension Application, which can be found here: https://docs.developers.symphony.com/building-extension-applications-on-symphony/building-extension-applications-on-symphony
Hi,
To use message pinning you would first need to create a message within the chat room. Then you would use the UpdateIM API call to pin that particular message at the top of the chatroom.
Here is more documentation on that API call https://developers.symphony.com/restapi/reference/update-im
I have also included a link to an example of using UpdateIM via our Python BDK https://github.com/finos/symphony-bdk-python/blob/main/examples/services/message_update.py
You can find the RoomID (aka streamID) by clicking on the timestamp of any message in the conversation. This will open the Message Status module, where the Conversation ID can be found, as shown in the following picture.
More information on streams can be found here, https://docs.developers.symphony.com/building-bots-on-symphony/datafeed/overview-of-streams