Join 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]]: Object
Hello radhika_kundana,
Seems like you didn't pass body parameter:
Add the following to the body section and run:{
"data" : {
"type" : "membership_request"
}
}For your reference sharing the developer doc link: https://developer.khoros.com/khoroscommunitydevdocs/reference/join-open-node
Hope it helps you.
Regards,
Abhishek Gupta