liqlAdmin in khoros aurora graphql API
Hi Folks, I want to add roles to the users using graphQL API given below. const ADD_USER_ROLE_MUTATION = gql` mutation addUsersToRole($roleKey: RoleKeyInput!, $users: [UserIdInput!]!) { addUsersToRole(roleKey: $roleKey, users: $users) { result { id name } } } `; const [addUserRole] = useMutation(ADD_USER_ROLE_MUTATION); addUserRole({ variables: { roleKey: { roleName: "role" }, users: [{ id: userId }] } }); The issue I am facing is that when this mutation is executed by an Admin user, the role is successfully added to the target user. However, when the same mutation is executed by a normal user, it fails to add the role due to permission denied errors. Is there a parameter or keyword that can be used in this mutation to allow a normal user to update their own roles or self-related data? For example, in Khoros Classic, we can use the liqlAdmin keyword in REST API requests to bypass such permissions. Is there an equivalent for GraphQL in Khoros Aurora? Thanks in Advance.Solved2.2KViews0likes13CommentsAny cons of NOT using LITHIUM.jQuery when calling an endpoint from a component?
Hi folks, I was wondering if using LITHIUM.jQuery when calling endpoints is the only preferred way of doing it: <@liaAddScript> ;(function ($) { $(document).ready(function () { function callLithiumEndpoint() { $.ajax({ url: '${endpointUrl}', }) } callLithiumEndpoint(); }); })(LITHIUM.jQuery); </@liaAddScript> Can it be done with vanilla JavaScript inside a <script> tag as well, for example using fetch? I noticed that endpoints can be triggered from a browser or a postman via their path https://<community-name>/pjakv59666/plugins/custom/<some-path-to-endpoint>/<component-name> Can it be treated as a simple url, passing there parameters and parsing it?Solved2KViews1like2CommentsLogging a user out not working
Hello, I'm currently developing a solution to log out a user from the community sessions automatically. I followed the API Reference here: https://developer.khoros.com/khoroscommunitydevdocs/reference/authsignout I am currently getting the correct response of the user being signed out of all sessions but when I go to the community forums with my test user I can still see the user logged in. This is the json response that I am receiving: { "status":"success", "message":"", "data": { "signed_off_all_sessions":true, "id":"#######" } } Context: we do use a cookie for our users to log into the community site if they are logged into our site. But I have made sure to just be logged into the community site without said cookie when trying this call out. Any help would be welcomed.1.8KViews0likes12CommentsHow to create API accessible user account with Community
I am new to Khoros platform and want to crawl data from community. For that I did signup process with one lithium community and got my username and password. I am trying to authenticate myself with via retrieve-the-session-key but api response says curl --location --request \ POST 'https://community.alteryx.com/restapi/vc/authentication/sessions/login' \ --form 'user.login=dshrm' \ --form 'user.password=****' <response status="error"> <error code="302"> <message> User authentication failed. </message> </error> </response> I am trying to get user details via LiQl basic query `select * from users limit 1` What exactly process do I need to follow to authenticate myself ?1.5KViews0likes11CommentsAPI v2 Search doesn't work
Reading this page, I quote: "In v2, perform a one-or-more term search with a comma-separated list of terms wrapped in parentheses. Use this when you want to return messages that have at least one of these terms in the defined fields. WHERE subject MATCHES ('apples', 'bananas', 'cherries')" This query returns 2 results: select subject,body from messages where subject matches 'attachment' This query returns 0 results. select subject,body from messages where subject matches ('attachment','android') According to the documentation I should be getting results. Fair to say that it's not WAI?1.3KViews0likes9Commentsjson query syntax matches AND OR
Hello, I cannot find the full json query syntax documentation here. Thats wha I'm asking in this post: How does a json based query look like for AND matches in body text. I want to query all posts containing term1 AND term2 in their body. My query currently is this. How do I add the term2? [ { "messages":{ "fields":[ "id", "subject", "search_snippet", "body", "cover_image.view_href", "teaser", "view_href", "author", "conversation.last_post_time", "replies.count(*)", "kudos.sum(weight)", "metrics.views", "labels" ], "constraints":[ { "category.id":"DE", "conversation.style":"tkb", "body":{ "matches":"term1" }, "depth":0 } ], "sorts": [ "post_time desc" ], "limit":10, "subQueries":{ "labels":{ "fields":[ "text", "id" ] } } } } ]1.3KViews1like6CommentsSelect labels along with messages in one query
I query messages with SELECT id, subject, search_snippet, body, cover_image.view_href, teaser, view_href, author, conversation.last_post_time, replies.count(*), metrics.views FROM messages WHERE category.id = 'DE' AND conversation.style = 'tkb' AND body MATCHES 'mykeyword' AND depth = 0 ORDER BY post_time DESC LIMIT 10 To get the labels of each message i currently do an additional labels query for each message. Is there a way to get the labels along with the messages in one query?Solved1.2KViews0likes8CommentsJoin node/group 301 API error
Hi, I was able to implement Leave node successfully using membership API(Javascript). But Join node API is returning 301 error and I don't see error details, can we see actual error details to find the issue? Code: I am calling below function on button click. function joinNode() { const options = { method: 'POST', headers: {Accept: 'application/json', 'Content-Type': 'application/json'} }; console.log(options); fetch('https://lithium.com/api/2.0/nodes/grouphub:'+ groupID + '/membership_requests', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err)); } Error details from console: POST https://lithium.com/api/2.0/nodes/grouphub:MexicoPowerApps/membership_requests 500 {status: 'error', message: 'An unexpected error occurred.', data: {…}, metadata: {…}} data:code: 301 developer_message: "" more_info: "" type: "error_data" [[Prototype]]: Object message: "An unexpected error occurred." metadata: {} status: "error" [[Prototype]]: ObjectSolved1.2KViews0likes4CommentsHow to get only Messages where some specific custom field have value?
Hi Team, I have a custom field added by Khoros in the messages object, I want to get only Messages where that specific custom field has value. Sample query: select c_abcd from messages where c_abcd!="" I don't want to get all messages and then in the loop filter the messages which don't have any value. Is there any direct API or solution to get the messages where the c_abcd custom field has some value? Any related replies would be appreciated. Regards Aman1.2KViews0likes11CommentsHow to retrieve "Internal reason for ban" field
Hi all, We are looking to extract some data from the "User bans" report in the (Classic) Community Admin interface, under "Mod Tools" > "User bans". When we go click on "Edit" on a particular user, we see the field "Internal Reason for ban;" how can we get a full list of banned users including the reason for ban? Is that field available via API somehow? I wasn't able to find anything. Thanks for any help, LeeSolved1.1KViews0likes2Comments