saikumarn
4 years agoAdvisor
Unable to create group hub using API
Hi, I am trying to create a group hub using this document (https://developer.khoros.com/khoroscommunitydevdocs/docs/create-a-group-hub?_ga=2.117082309.2123355538.1619410972-1050991493.1615871887) I ...
- 4 years ago
I believe the issue is with the "parent" key, which shouldn't be necessary. If you try it without that but still with the "parent_category" key (assuming that category exists) then it should work for you.
For example:
{ "grouphub":{ "id":"shutterbugs", "title":"Shutterbugs", "description" : "test", "membership_type":"open", "conversation_styles":[ "forum", "blog" ], "parent_category":{ "id":"testGroups" } } }
Alternatively, if you are using Python to make the REST API calls then you could utilize the open-source Khoros Python library I'm developing to create your group hubs, as documented here and shown in the example below.
>>> khoros.grouphubs.create( ... 'python-lovers', 'The Python Lovers Group', \ ... 'This is my witty description.', \ ... open_group=True, discussion_styles=['forum', 'blog'], \ ... parent_category_id='testGroups', return_url=True) 'https://stage.example.com/t5/the-python-lovers-group/gh-p/python-lovers'
Hope this helps!