Any 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?Solved1.6KViews1like2CommentsAPI 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?1KViews0likes9CommentsAPI call to post message has blank response
Hi folks. Been using this in an endpoint for many years, but now it returns a blank response, so I can't read if it was successful. <#assign result_post = restadmin("/boards/id/${board_id}/messages/post?message.subject=${msg_subject?url}&message.body=${msg_body?url}")/> If, however, I do a simple $.post('/restapi/vc/boards/id/${board_id}/messages/post?message.subject=subject&message.body=body') then I get a perfectly normal response. Did something change with the v1 API?787Views0likes6CommentsWhere do I store a large amount of data, for reference?
Hi folks, planning a custom component which will basically check the user's id against a pre-existing list. I imagine this list could grow into the thousands. What are my options for storing this data/list? One option I use for smaller datasets is a hidden post and simply store it as a comma separated string. Another option might be to store a string in a custom metadata field, I guess? Any ideas how large that could be? (I don't have access to a separate server.)744Views2likes5CommentsLogging 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.634Views0likes12CommentsCommunity API v2 Documentation is Getting a Refresh
Hello everyone, We're excited to share some news about our Community API v2 documentation! We've brought the API spec and object indexes to our Developer Portal at https://developer.khoros.com. Here is a blog post explaining more: https://community.khoros.com/t5/Khoros-Community-Blog/Community-API-v2-Refresh/ba-p/606472 Have questions? Feel free to leave a comment and let us know! Change is hard! If you get lost with the new structure, here is the link to the old experience. It will be live for another couple of weeks as we evaluate feedback.618Views1like0CommentsUnable to change SSO ID of user with the API
Hey all, We need to update the SSO ID of our users systematically and I am writing a Python script to do so. However, when attempting to do so in the API v1 using a POST call to the /users/id/{id}/sso_id/set endpoint, I am getting the following response. { "response": { "status": "error", "error": { "code": 303, "message": "Permission Denied" } } } I am authenticated as a user with full admin privileges so I'm not sure why I would be getting the Permission Denied message, especially since my user can change SSO IDs via Community Admin just fine. The payload (value=) is also a simple numeric string so it shouldn't be due to invalid. characters or anything. Anyone ever experienced this and know how I can get around it? Thanks in advance!Solved600Views0likes10CommentsSubscription API usage
I am trying to use the API described here: (https://developer.khoros.com/khoroscommunitydevdocs/docs/subscribe-to-community-events). This feature is already enabled on stage and production environments. I created an admin user with the necessary API rights. I tried to authenticate this user using the sessions key option as described here: https://developer.khoros.com/khoroscommunitydevdocs/docs/session-key using postman. I got a 502 Bad Gateway response. Do I need to enable CORS and whitelist IPs as described here: https://developer.khoros.com/khoroscommunitydevdocs/docs/getting-started-with-api-1 too?544Views0likes1CommentHow 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 ?540Views0likes11Comments