Check Community Membership
curl --request POST \
--url https://api.sorsa.io/v3/check-community-member \
--header 'ApiKey: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"community_id": "1966045657589813686",
"user_id": "<string>",
"user_link": "https://twitter.com/elonmusk",
"username": "elonmusk"
}
'import requests
url = "https://api.sorsa.io/v3/check-community-member"
payload = {
"community_id": "1966045657589813686",
"user_id": "<string>",
"user_link": "https://twitter.com/elonmusk",
"username": "elonmusk"
}
headers = {
"ApiKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {ApiKey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
community_id: '1966045657589813686',
user_id: '<string>',
user_link: 'https://twitter.com/elonmusk',
username: 'elonmusk'
})
};
fetch('https://api.sorsa.io/v3/check-community-member', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sorsa.io/v3/check-community-member",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'community_id' => '1966045657589813686',
'user_id' => '<string>',
'user_link' => 'https://twitter.com/elonmusk',
'username' => 'elonmusk'
]),
CURLOPT_HTTPHEADER => [
"ApiKey: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sorsa.io/v3/check-community-member"
payload := strings.NewReader("{\n \"community_id\": \"1966045657589813686\",\n \"user_id\": \"<string>\",\n \"user_link\": \"https://twitter.com/elonmusk\",\n \"username\": \"elonmusk\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("ApiKey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sorsa.io/v3/check-community-member")
.header("ApiKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"community_id\": \"1966045657589813686\",\n \"user_id\": \"<string>\",\n \"user_link\": \"https://twitter.com/elonmusk\",\n \"username\": \"elonmusk\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sorsa.io/v3/check-community-member")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["ApiKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"community_id\": \"1966045657589813686\",\n \"user_id\": \"<string>\",\n \"user_link\": \"https://twitter.com/elonmusk\",\n \"username\": \"elonmusk\"\n}"
response = http.request(request)
puts response.read_body{
"is_member": true
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Verification
Check Community Membership
Checks whether a specific user is a member of a given Twitter/X Community. Returns is_member: true if the user belongs to that community. Requires community_id and one user identifier (username, user_link, or user_id).
POST
/
check-community-member
Check Community Membership
curl --request POST \
--url https://api.sorsa.io/v3/check-community-member \
--header 'ApiKey: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"community_id": "1966045657589813686",
"user_id": "<string>",
"user_link": "https://twitter.com/elonmusk",
"username": "elonmusk"
}
'import requests
url = "https://api.sorsa.io/v3/check-community-member"
payload = {
"community_id": "1966045657589813686",
"user_id": "<string>",
"user_link": "https://twitter.com/elonmusk",
"username": "elonmusk"
}
headers = {
"ApiKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {ApiKey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
community_id: '1966045657589813686',
user_id: '<string>',
user_link: 'https://twitter.com/elonmusk',
username: 'elonmusk'
})
};
fetch('https://api.sorsa.io/v3/check-community-member', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sorsa.io/v3/check-community-member",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'community_id' => '1966045657589813686',
'user_id' => '<string>',
'user_link' => 'https://twitter.com/elonmusk',
'username' => 'elonmusk'
]),
CURLOPT_HTTPHEADER => [
"ApiKey: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sorsa.io/v3/check-community-member"
payload := strings.NewReader("{\n \"community_id\": \"1966045657589813686\",\n \"user_id\": \"<string>\",\n \"user_link\": \"https://twitter.com/elonmusk\",\n \"username\": \"elonmusk\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("ApiKey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sorsa.io/v3/check-community-member")
.header("ApiKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"community_id\": \"1966045657589813686\",\n \"user_id\": \"<string>\",\n \"user_link\": \"https://twitter.com/elonmusk\",\n \"username\": \"elonmusk\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sorsa.io/v3/check-community-member")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["ApiKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"community_id\": \"1966045657589813686\",\n \"user_id\": \"<string>\",\n \"user_link\": \"https://twitter.com/elonmusk\",\n \"username\": \"elonmusk\"\n}"
response = http.request(request)
puts response.read_body{
"is_member": true
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Body
application/json
community_id and user_handle or user_id required
Response
OK
true if the user is a member of the specified community.
Was this page helpful?
⌘I