Can somebody help me with session keys?
Hello, We'd like to connect one of our group hub with our Power BI report. We'd like to see the list of users synched automatically (it's a hidden group hub, and whoever joins the group grabs a license automatically to our beta software too). So far it seems that Bulk API was not really helpful with that, but Search API would be a great fit. However, this is where we have our problem - it requires a session key, that we don't know how to get. We use SSO on our site (SAML), and I can't seem to find anything useful in the documentation (https://developer.khoros.com/khoroscommunitydevdocs/docs/search-api-overview)... Can somebody help me how to make this work? We're running on Classic currently. Thanks, Noémi838Views
Sign in to react to this post1Comment
Use Message body
Hi everyone! I'm currently trying to create a custom component, the goal is to display specific messages using a condition. I have the correct QUERY but I don´t know how to use/render the response. This is my code: <#assign apiVersion = "2.0" /> <#assign QUERY = "SELECT * FROM messages WHERE tags.text = 'F5 XC'" /> <#assign messageList = rest(apiVersion, "/search?q=" + QUERY?url).data.items /> <section> <h1 style="color: red;">Message List Component</h1> <#list messageList as messageItem> <h2 style="color: green;">${messageItem.subject}</h2> <p>${messageItem.body}</p> </#list> </section> This is the result: I'm getting in the body html tags as strings, so my question is how can I use the response or how can I render the message body properly?Solved800Views
Sign in to react to this post6Comments
- MattV3 years agoKhoros Staff
Freemarker auto escaping is turned on for your community. This is a great security measure to prevent arbitrary code from executing on your community.
More details on freemarker auto escape: https://freemarker.apache.org/docs/dgui_misc_autoescaping.html
The safest option is to work around this by removing the HTML markup from the response, and render the text as plain text.
You can also see from that freemarker doc that you can use ?no_esc to prevent escaping on that variable.
BE CAREFUL doing that, especially on the message subject. The message body is USUALLY protected by HTML permissions and prevents users from posting unsafe HTML. But it shouldn't be assumed to be fool-proof.
DO NOT ?no_esc the message subject. The message subject allows arbitrary HTML regardless of HTML permissions in community. Core components escape the subject, but the API does not do this for you, so someone can put javascript in the message subject, and it would execute if you do ?no_esc on it.
Some characters get double-escaped, such as " appearing as "e; , so you may want to add some fixes such as ?replace('"e;','"') on the message subject so safe characters like that still appear as desired
Sign in to react to this post
How do I push new post notifications (e.g. via webhook) to third party services?
Good morning team, My goal is to make Khoros a "single source of truth" for several different discussion spaces at my company. Not all of them support RSS... but many of them support REST webhooks. How could I configure Khoros to send REST POSTs (aka webhooks) to specific listener URLs when topics are created? How could I filter that to specific labels, groups or admin tags? Thanks in advance for your help.663Views
Sign in to react to this post1Comment
How to set predefined-only while creating GroupHub
So, I am in an interesting scenario: I want to create a Group Hub --> Easy enough to create using the REST API Endpoints I want to have Forum + Calendar + TKB created within the Group Hub --> Same as above I want to make sure that the Boards under the Group Hub have `predefined-only` labels when creating topics on the boards. --> This seems not possible What I tried doing was I tried using the Update Board API to enforce `allowed_labels` to `predefined-only` only to see that the API does not allow this change on Update. So, my question is how do I set `predefined-only` for the boards under GroupHubs?Solved600Views
Sign in to react to this post5Comments
- AndrewF4 years agoKhoros Oracle
I did a little bit of testing, and I was able to set this setting using API v1 on an individual Idea Exchange within the Group Hub:
GET /restapi/vc/boards/id/xxx/settings/name/label.allowed_labels * Returned "freeform-only" POST /restapi/vc/boards/id/xxx/settings/name/label.allowed_labels/set * value=predefined-only GET /restapi/vc/boards/id/xxx/settings/name/label.allowed_labels * Returned "predefined-only"After doing this, I did see the labels being enforced in the "New Idea" flow. I was not able to work with the group hub itself in API v1, and I did not get a chance to try API v2, but I assume that it would work in the same way.
Let me know how that goes!
Sign in to react to this post
Group Role vs. Regular Roles
Hi, I'm trying to do something like this, but with group roles: <#assign is_gm = false /> <#list restadmin("/users/id/${user.id?c}/roles").roles.role as role> <#if role.name?? && (role.name == "GroupMember")> <#assign is_gm = true /> Then if it's true or false, I can make the page display accordingly. Apparently this doesn't work for Group Roles though, because it's doesn't recognize GroupMember as a role. So how do I modify it to check whether or not a person has a group role, as opposed to a regular role? Thanks546Views
Sign in to react to this post4Comments
Can we show the event calendar component only on group hubs with event discussion style enabled?
Can we scope the calendar event component ONLY on those group hubs that have Event discussion style enabled? For Example: Group Hub1 (with all four discussion styles enabled) forum Article Suggestion Event Group Hub2 (with only Article discussion style enabled) Article So, when the even calendar component is added on group hub page, the component is displayed on all the group hubs on community (in above case it's added on both group hubs with and without event discussion style enabled). Can we scope it to only group hubs with Event discussion style enabled ? In the above example we would want it to be displayed only on Group Hub1. Is there a parameter that can be configured to toggle this setting on this component? <component id="occasions.widget.calendar" />322Views
Sign in to react to this post4Comments
groups
6 TopicsYou’ve seen all recent content