Get organization users groups report
Returns a report of all users in your organization with their group memberships. This endpoint returns all users without pagination and always includes group information. The report can be retrieved in JSON or CSV format by sending specific content-type headers.
GET
/
organizations
/
users
/
users_groups_report
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.organizations.users.getGroupsReport();
console.log(response.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.organizations.users.get_groups_report()
print(response.data)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.Organizations.Users.GetGroupsReport(context.TODO(), telnyx.OrganizationUserGetGroupsReportParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.organizations.users.UserGetGroupsReportParams;
import com.telnyx.sdk.models.organizations.users.UserGetGroupsReportResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
UserGetGroupsReportResponse response = client.organizations().users().getGroupsReport();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.organizations.users.get_groups_report
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client->organizations->users->getGroupsReport(
accept: 'application/json'
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx organizations:users get-groups-report \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/organizations/users/users_groups_report \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"record_type": "organization_sub_user",
"email": "user@example.com",
"user_status": "enabled",
"organization_user_bypasses_sso": false,
"created_at": "2018-02-02T22:25:27.521Z",
"last_sign_in_at": "2018-02-02T22:25:27.521Z",
"groups": [
{
"id": "7b09cdc3-8948-47f0-aa62-74ac943d6c59",
"name": "Engineering"
},
{
"id": "8c09cdc3-8948-47f0-aa62-74ac943d6c60",
"name": "Sales"
}
]
},
{
"id": "9d09cdc3-8948-47f0-aa62-74ac943d6c61",
"record_type": "organization_owner",
"email": "owner@example.com",
"user_status": "enabled",
"organization_user_bypasses_sso": false,
"created_at": "2018-01-01T00:00:00.000Z",
"last_sign_in_at": "2018-02-02T22:25:27.521Z",
"groups": []
}
]
}{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "Could not understand the provided credentials.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10009"
}
}
]
}{
"errors": [
{
"code": "10010",
"title": "Not authorized",
"detail": "You are not authorized to access the requested resource.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10010"
},
"source": {
"pointer": "/"
}
}
]
}{
"errors": [
{
"code": "10005",
"title": "Resource not found",
"detail": "The requested resource or URL could not be found.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10005"
},
"source": {
"pointer": "/"
}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Specify the response format. Use 'application/json' for JSON format or 'text/csv' for CSV format.
Available options:
application/json, text/csv Response
Successful response with a list of organization users and their group memberships.
Show child attributes
Show child attributes
Was this page helpful?
⌘I
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.organizations.users.getGroupsReport();
console.log(response.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.organizations.users.get_groups_report()
print(response.data)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.Organizations.Users.GetGroupsReport(context.TODO(), telnyx.OrganizationUserGetGroupsReportParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.organizations.users.UserGetGroupsReportParams;
import com.telnyx.sdk.models.organizations.users.UserGetGroupsReportResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
UserGetGroupsReportResponse response = client.organizations().users().getGroupsReport();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.organizations.users.get_groups_report
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client->organizations->users->getGroupsReport(
accept: 'application/json'
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx organizations:users get-groups-report \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/organizations/users/users_groups_report \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"record_type": "organization_sub_user",
"email": "user@example.com",
"user_status": "enabled",
"organization_user_bypasses_sso": false,
"created_at": "2018-02-02T22:25:27.521Z",
"last_sign_in_at": "2018-02-02T22:25:27.521Z",
"groups": [
{
"id": "7b09cdc3-8948-47f0-aa62-74ac943d6c59",
"name": "Engineering"
},
{
"id": "8c09cdc3-8948-47f0-aa62-74ac943d6c60",
"name": "Sales"
}
]
},
{
"id": "9d09cdc3-8948-47f0-aa62-74ac943d6c61",
"record_type": "organization_owner",
"email": "owner@example.com",
"user_status": "enabled",
"organization_user_bypasses_sso": false,
"created_at": "2018-01-01T00:00:00.000Z",
"last_sign_in_at": "2018-02-02T22:25:27.521Z",
"groups": []
}
]
}{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "Could not understand the provided credentials.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10009"
}
}
]
}{
"errors": [
{
"code": "10010",
"title": "Not authorized",
"detail": "You are not authorized to access the requested resource.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10010"
},
"source": {
"pointer": "/"
}
}
]
}{
"errors": [
{
"code": "10005",
"title": "Resource not found",
"detail": "The requested resource or URL could not be found.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10005"
},
"source": {
"pointer": "/"
}
}
]
}