I'm attempting to use the REST API to have a member follow a forum topic, using the API found here:
https://invisioncommunity.com/developers/rest-api?endpoint=core/members/POSTitem_follows
As part of my integration tests, I am successfully able to create a member and a topic. I'm now attempting to have the member follow the topic, but I'm receiving errors.
Ultimately, the URL I'm posting to would look something like this:
https://community.justaskmax.com/api/core/members/421/follows?followApp=forums&followArea=topic&followId=543&followAnon=false&followNotify=true&followType=immediate
The parameters I'm using are:
followApp: forums
followArea: topic
followId: <the id of the topic that was created>
followAnon: false
followNotify: true
followType: immediate
The member id in the /core/members/{id}/follows would be the id of the user that was created.
However, this results in the following error:
{
"errorCode": "2C292\/J",
"errorMessage": "INVALID_CONTENT"
}
The error suggests that the topic I'm trying to follow doesn't exist. However, I'm verifying the topic's existence using its id before attempting to follow, and the API tells me that the topic does indeed exist.
This error is also returned if I try to add an already existing member to an already existing topic (and also an existing member to a newly created topic).
I'm able to list the follows for members, and it looks like my followApp and followArea parameters are correct. For example, a call to
https://community.justaskmax.com/api/core/members/1/follows
returns:
{
"followKey": "43562d4ff4258514985f03acfdedf436",
"followApp": "forums",
"followArea": "topic",
"followId": 99,
"followAnon": false,
"followNotify": true,
"followType": "immediate",
"followSent": null,
"followName": "parental don't work on Xbox",
"followUrl": "https:\/\/community.justaskmax.com\/topic\/99-parental-dont-work-on-xbox\/"
}
Everything therefore looks correct for what I'm attempting to do, but I'm unable to figure out why I'm getting the error.
Any ideas?