Forum Discussion
SuzieH
Khoros Alumni (Retired)
Hi phoneboy
The only difference I can see between your example and the documentation is that the docs show the body parameters wrapped in data object. Maybe try this format?
{
"data" : {
"type": "membership_request",
"approve_request": true,
"user_id": uid
}
}
You might also try the restBuilder FreeMarker method.
Let me know if one of those options don't work and I'll keep digging.
phoneboy
5 years agoDirector
Tried that format, same result.
The error returned, if it's helpful:
{
"status":"error",
"message":"Membership Request not found.",
"data": {
"type":"error_data",
"code":505,
"developer_message":"",
"more_info":""
},
"metadata":{}
}
Making the same call using restBuilder:
<#assign approve = restBuilder()
.method("PUT")
.path("/nodes/grouphub:" + node + "/membership_requests")
.body({ "data" : {
"type": "membership_request",
"approve_request": "true",
"user_id": uid
} })
.admin(true) />
<#assign resp = approve.call() />
I get the dreaded Freemarker error dump with this being the only potentially meaningful error:
Caused by: freemarker.template.TemplateModelException: unexpected exception during rest call: FreemarkerRestCall{version='2.0', restCall=RestCall{path=[nodes, grouphub:myCommunity, membership_requests], action=PUT}, adminCall=true, impersonationParameterSource=null}
On my page quilt, it says "Widget cannot be displayed."
Related Content
- 5 months ago
- 30 days ago
- 3 years ago
- 8 months ago