Get your Communities
This endpoint retrieves a list of communities filtered by your role and pagination.
Get Communities
GET https://api.whisk.com/community/v2
You can append the following query parameters to the base URL to pull all your communities:
Query Parameters
filters.roles
array
Retrieve communities based on your selected roles. You can choose one or more of these supported values:
- COMMUNITY_ROLE_OWNER
- COMMUNITY_ROLE_ADMIN
- COMMUNITY_ROLE_MEMBER
- COMMUNITY_ROLE_BLOCKED
- COMMUNITY_ROLE_PENDING
paging.limit
string
The maximum number of communities to retrieve.
paging.cursors.after
string
This parameter is used for cursor-based pagination. It takes a community ID as its value and retrieves only those communities that appear after it in the database.
paging.cursors.before
string
This parameter is used for cursor-based pagination. It takes a community ID as its value and retrieves only those communities that appear before it in the database
fields
array
Any additional community details to retrieve. You can choose one or more of these supported values:
- COMMUNITY_FIELD_DESCRIPTION
- COMMUNITY_FIELD_TOPICS
- COMMUNITY_FIELD_SOCIAL_SETTINGS
- COMMUNITY_FIELD_PERMISSIONS
- COMMUNITY_FIELD_MEMBERS_COUNT
- COMMUNITY_FIELD_RECIPES_COUNT
- COMMUNITY_FIELD_SPONSORED
Note: For performance reasons, we recommend using this parameter only when required.
Headers
Authentication
string
User Access token containing community:read scope to authorize the API usage. For more information, see Authentication.
{
"communities": [
{
"id": "string",
"name": "string",
"image": {
"url": "string",
"width": 0,
"height": 0,
"selection": {
"x": 0,
"y": 0,
"width": 0,
"height": 0
}
},
"description": "string",
"topics": [
{
"id": "string",
"display_name": "string"
}
],
"social_settings": {
"website_url": "string",
"instagram_username": "string",
"youtube_channel_url": "string",
"tiktok_username": "string"
},
"permissions": {
"role": "COMMUNITY_ROLE_INVALID",
"mode": "COMMUNITY_CONTRIBUTION_PERMISSION_MODE_INVALID",
"visibility": "COMMUNITY_VISIBILITY_INVALID"
},
"members": {
"count": 0
},
"recipes": {
"count": 0
},
"is_sponsored": true
}
],
"paging": {
"cursors": {
"after": "string",
"before": "string"
},
"total": "string"
}
}{
"error_code": "REAL_CODES_ARE_IN_ENDPOINT_DESCRIPTION",
"message": "Additional details about error are not static and can be changed"
}{
"code": "auth.tokenNotFound"
}This is unexpected response, something is wrong on our side, please contact: [email protected]Sample Request and Response
curl -X GET "https://api.whisk.com/community/v2?filters.roles=COMMUNITY_ROLE_UNSET&filters.roles=COMMUNITY_ROLE_OWNER&filters.roles=COMMUNITY_ROLE_ADMIN&filters.roles=COMMUNITY_ROLE_MEMBER&filters.roles=COMMUNITY_ROLE_BLOCKED&filters.roles=COMMUNITY_ROLE_PENDING&paging.limit=3&fields=COMMUNITY_FIELD_DESCRIPTION&fields=COMMUNITY_FIELD_TOPICS&fields=COMMUNITY_FIELD_SOCIAL_SETTINGS&fields=COMMUNITY_FIELD_PERMISSIONS&fields=COMMUNITY_FIELD_MEMBERS_COUNT&fields=COMMUNITY_FIELD_RECIPES_COUNT&fields=COMMUNITY_FIELD_SPONSORED"
-H "Accept: application/json"
-H "Authorization: Bearer <YOUR-API-ACCESS-KEY>"{
"communities": [
{
"id": "6cabec8c4b9245d993d641b58a0bb0b8",
"name": "10 ingredients or less",
"image": {
...
},
"description": "Keep that shopping list short!",
"topics": [
...
],
"permissions": {
...
},
"members": {
"count": 33137
},
"recipes": {
"count": 319
}
},
{
"id": "a47801f461a94b50a84dc6a5add03e71",
"name": "Keto for beginners",
"image": {
...
},
"description": "Just getting into Keto? Here are some great places to start",
"topics": [
...
],
"permissions": {
...
},
"members": {
"count": 9296
},
"recipes": {
"count": 154
}
},
{
"id": "afa1b13c188c46b4830adbd3ad8367b2",
"name": "Indian Recipes",
"image": {
...
},
"description": "Everyday Indian food as well as blow-out recipes ",
"topics": [
...
],
"permissions": {
...
},
"members": {
"count": 415
},
"recipes": {
"count": 21
}
}
],
"paging": {
"cursors": {
"after": "eyJpZCI6ImFmYTFiMTNjMTg4YzQ2YjQ4MzBhZGJkM2FkODM2N2IyIiwiaW5kZXgiOjJ9"
},
"total": "6"
}
}Last updated
Was this helpful?