Get self permission in community
curl --request GET \
--url https://apix.us.amity.co/api/v3/communities/{communityId}/permissions/me \
--header 'Authorization: Bearer <token>'import requests
url = "https://apix.us.amity.co/api/v3/communities/{communityId}/permissions/me"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apix.us.amity.co/api/v3/communities/{communityId}/permissions/me', 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://apix.us.amity.co/api/v3/communities/{communityId}/permissions/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apix.us.amity.co/api/v3/communities/{communityId}/permissions/me"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apix.us.amity.co/api/v3/communities/{communityId}/permissions/me")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apix.us.amity.co/api/v3/communities/{communityId}/permissions/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"isCreator": false,
"permissions": [
"MUTE_CHANNEL"
]
}{
"status": "error",
"code": 400300,
"message": "Forbidden error."
}{
"status": "error",
"code": 400311,
"message": "RateLimit Exceed."
}{
"status": "error",
"code": 500000,
"message": "Unexpected error"
}Community
Get self permission in community
query comments.
GET
/
api
/
v3
/
communities
/
{communityId}
/
permissions
/
me
Get self permission in community
curl --request GET \
--url https://apix.us.amity.co/api/v3/communities/{communityId}/permissions/me \
--header 'Authorization: Bearer <token>'import requests
url = "https://apix.us.amity.co/api/v3/communities/{communityId}/permissions/me"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apix.us.amity.co/api/v3/communities/{communityId}/permissions/me', 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://apix.us.amity.co/api/v3/communities/{communityId}/permissions/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apix.us.amity.co/api/v3/communities/{communityId}/permissions/me"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apix.us.amity.co/api/v3/communities/{communityId}/permissions/me")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apix.us.amity.co/api/v3/communities/{communityId}/permissions/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"isCreator": false,
"permissions": [
"MUTE_CHANNEL"
]
}{
"status": "error",
"code": 400300,
"message": "Forbidden error."
}{
"status": "error",
"code": 400311,
"message": "RateLimit Exceed."
}{
"status": "error",
"code": 500000,
"message": "Unexpected error"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Required string length:
1 - 900Response
Communities permission information for this user
Is this person create this community?
Example:
false
Available options:
MUTE_CHANNEL, CLOSE_CHANNEL, EDIT_CHANNEL, EDIT_CHANNEL_RATELIMIT, EDIT_MESSAGE, DELETE_MESSAGE, BAN_USER_FROM_CHANNEL, MUTE_USER_INSIDE_CHANNEL, ADD_CHANNEL_USER, REMOVE_CHANNEL_USER, EDIT_CHANNEL_USER, ASSIGN_CHANNEL_USER_ROLE, BAN_USER, EDIT_USER, ASSIGN_USER_ROLE, EDIT_USER_FEED_POST, DELETE_USER_FEED_POST, EDIT_USER_FEED_COMMENT, DELETE_USER_FEED_COMMENT, ADD_COMMUNITY_USER, REMOVE_COMMUNITY_USER, EDIT_COMMUNITY_USER, BAN_COMMUNITY_USER, MUTE_COMMUNITY_USER, EDIT_COMMUNITY, DELETE_COMMUNITY, EDIT_COMMUNITY_POST, DELETE_COMMUNITY_POST, PIN_COMMUNITY_POST, EDIT_COMMUNITY_COMMENT, DELETE_COMMUNITY_COMMENT, ASSIGN_COMMUNITY_USER_ROLE, CREATE_COMMUNITY_CATEGORY, EDIT_COMMUNITY_CATEGORY, DELETE_COMMUNITY_CATEGORY, CREATE_ROLE, EDIT_ROLE, DELETE_ROLE, MANAGE_COMMUNITY_STORY