Comment on page
Block User
Block User is now Generally Available (GA) - please see here for more detail. Beta Feature (Beta) here has been deprecated and is intended for legacy use only. This Block User (Beta) feature will be removed on 28 February 2024
The block/unblock user service is designed to support block/unblock users feature. The primary function of this service is to:
- 1.Block/Unblock other users
- 2.Check whether or not the system should hide the content of the specified user ID, based on block/unblock from
- 3.Get a list of users blocked by the current user
Block User is currently in Private Beta. Please submit your request to the Amity Help Center to enable this feature. It will take approximately 5 business days to process your request.
With the Block API, you can add a user to the list of users to be blocked.
post
https://beta.amity.services/
block/members
curl --location --request POST 'https://beta.amity.services/block/members' \
--header 'Authorization: Bearer <ACCESSTOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"blockUserId":"userId"
}'
Current limitations of the block API are:
- Only 1 user can be blocked at a time.
- The Block API has no influence on the Amity Feed API. Developers must filter the blocked content themselves in the frontend.
With the Unblock API, you can remove a user from the list of currently blocked users.
delete
https://beta.amity.services/
block/members
curl --location --request DELETE 'https://beta.amity.services/block/members' \
--header 'Authorization: Bearer <ACCESSTOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"blockUserId":"testBlock"
}'
The current limitations of the Unblock Posts API are:
- Only 1 user can be unblocked at a time.
- The blocking API does not affect the Amity feed API. Developers have to filter blocked content themselves on the frontend.
With the Block user list API, you can retrieve the list of users who have been blocked by the current user.
post
https://beta.amity.services/
block
curl --location --request POST 'https://beta.amity.services/block' \
--header 'authorization: Bearer <ACCESSTOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{}'
Current limitations on Unblock Posts API are:
- Each request returns only 20 posts.
- The block API does not affect the Amity feed API. Developers have to filter the blocked content themselves in the frontend.
checkIsHide API can be used to Check wether contents from users should be hide or not.
get
https://beta.amity.services/
block/members
curl --location --request GET 'https://beta.amity.services/block/members?checkList=userId1&checkList=userId2' \
--header 'Authorization: Bearer <ACCESSTOKEN>'
The current limitations of the Unblock Posts API are:
- You can check a maximum of 20 users for each request.
- The Block API does not affect the Amity feed API. Developers have to filter the blocked content themselves in the frontend.
Last modified 4mo ago