Toggle Follow for user
This API endpoint allows the authenticated user to toggle their follow status for another user by sending a POST request with the target user's username. If the user is already following the target user, sending the same request will unfollow the user, and vice versa.
System will return found error if target user is not found.
Path Parameters
target user's username
Query Parameters
Client API token
Header Parameters
user access token
client access token
timestamp of access token expiry date
Default value: Bearer
token type
user uid
- 200
- 401
- 403
- 404
Successful response
Response Headers
Schema
{
"followed": true
}
{
"followed": true
}
{
"followed": false
}
{
"success": true
}
Unauthorized response, api will respond with this 401 eithr user is not logged in or do not have permission to perform some action. Like creating a post in a room, but user is not member of room.
System will also return 401 if api token is missing or invlaid.
Schema
Default value: 401
Default value: false
{
"errors": [
"string"
],
"status": 401,
"success": false
}
{
"errors": [
"You need to sign in or sign up before continuing."
],
"success": false
}
{
"message": "You don't have permission!",
"status": 401,
"success": false
}
Forbidden, api key is missing or invalid
Schema
Default value: false
Default value: 401
{
"success": false,
"message": "string",
"status": 401
}
{
"success": false,
"message": "You don't have permission!"
}
Not Found
Schema
{
"success": true,
"message": "string"
}
{
"success": false,
"message": "Invalid Users"
}