users
Get Users
Get users for the specified organization.
Returns a paginated list of all users that belong to the specified organization. Results include user details such as name, email, GitHub username, and avatar. Use pagination parameters to control the number of results returned.
Rate limit: 60 requests per 30 seconds.
GET
/
v1
/
organizations
/
{org_id}
/
users
Get Users
curl --request GET \
--url https://api.codegen.com/v1/organizations/{org_id}/usersimport requests
url = "https://api.codegen.com/v1/organizations/{org_id}/users"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.codegen.com/v1/organizations/{org_id}/users', 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.codegen.com/v1/organizations/{org_id}/users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api.codegen.com/v1/organizations/{org_id}/users"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.codegen.com/v1/organizations/{org_id}/users")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.codegen.com/v1/organizations/{org_id}/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"items": [
{
"id": 123,
"github_user_id": "<string>",
"github_username": "<string>",
"email": "<string>",
"avatar_url": "<string>",
"full_name": "<string>",
"role": "<string>",
"is_admin": true
}
],
"total": 123,
"page": 123,
"size": 123,
"pages": 123
}{
"message": "You do not have access to this organization.",
"status_code": 403
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"message": "Rate limit exceeded. Please try again later.",
"status_code": 429
}Headers
Path Parameters
Query Parameters
Required range:
x >= 0Required range:
1 <= x <= 100Was this page helpful?
⌘I
Get Users
curl --request GET \
--url https://api.codegen.com/v1/organizations/{org_id}/usersimport requests
url = "https://api.codegen.com/v1/organizations/{org_id}/users"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.codegen.com/v1/organizations/{org_id}/users', 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.codegen.com/v1/organizations/{org_id}/users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api.codegen.com/v1/organizations/{org_id}/users"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.codegen.com/v1/organizations/{org_id}/users")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.codegen.com/v1/organizations/{org_id}/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"items": [
{
"id": 123,
"github_user_id": "<string>",
"github_username": "<string>",
"email": "<string>",
"avatar_url": "<string>",
"full_name": "<string>",
"role": "<string>",
"is_admin": true
}
],
"total": 123,
"page": 123,
"size": 123,
"pages": 123
}{
"message": "You do not have access to this organization.",
"status_code": 403
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"message": "Rate limit exceeded. Please try again later.",
"status_code": 429
}