Block User

Block a user by calling the "block" to efficiently block a user, preventing further interactions.

info

{api-base-url} can be obtained from the MirrorFly console.

HTTP request#

curl -X POST 'http://{api-base-url}/api/v1/users/block' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: AuthToken' \
--data-urlencode 'userId=*****'

Request Params#

ParamDataTypeRequiredDescription
userIdStringYesUser Id of the user you want to block

Responses#

If successful, this action returns the response body.

{
"status": 200,
"message": "User blockout requested"
}

Error#

In the case of an error, an error object like below is returned.

When the token passed in Headers is not given or expired

{
"status": 401,
"message": "Token Expired"
}

In the case of a user id is not availble

{
"status": 400,
"message": "Invalid user id."
}

In the case of a user tries to block/unblock self account

{
"status": 400,
"message": "Blocking/Unblocking of self account is not allowed"
}

In the case of a user is already blocked

{
"status": 400,
"message": "User is already in blocked list"
}