Check if a Telegram user has an active membership in a community
GET
/membership/check-telegram/{communityId}/{telegramUserId}Authorization
AuthorizationBearer token (API Key) · headerrequiredAPI Key for programmatic access (format: insy_xxxxx)
Path parameters
communityIdstringrequiredtelegramUserIdnumberrequiredResponses
200Successful response
successbooleanrequiredWhether the request was successful
errorCodestringrequiredThe error code returned by the request
Allowed:
not_foundbad_requestalready_existsunauthorizedforbiddeninternal_server_errorservice_unavailabletimeoutconflictprecondition_failedunprocessable_entitymessagestringrequiredThe message returned by the request
dataCheckTelegramMembershipDtoShow propertiesHide properties
isActivebooleanrequiredWhether the user has an active membership
membershipIdobject | nullrequiredMembership ID if active
401Invalid, expired, or revoked API key
403Insufficient API key permissions
Try it
Server
Authorization
Parameters
Request
curl -X GET "https://api.insy.io/membership/check-telegram/string/0" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://api.insy.io/membership/check-telegram/string/0", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});import requests
response = requests.get(
"https://api.insy.io/membership/check-telegram/string/0",
headers={
"Authorization": "Bearer YOUR_TOKEN"
},
)Response
{
"success": true,
"errorCode": "not_found",
"message": "Success",
"data": {
"isActive": true,
"membershipId": {}
}
}Invalid, expired, or revoked API key
Insufficient API key permissions