> For a complete documentation index, fetch https://docs.voximplant.ai/llms.txt

# GetUsers

POST https://api.voximplant.com/platform_api/GetUsers

Shows the users of the specified account.

Allowed roles: `Owner`, `Admin`, `Developer`, `Supervisor`, `User manager`.

**Example request:** Get two first identities.

Reference: https://docs.voximplant.ai/api-reference/management-api/reference/users/get-users

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: management-api
  version: 1.0.0
paths:
  /GetUsers:
    post:
      operationId: get-users
      summary: GetUsers
      description: >-
        Shows the users of the specified account.


        Allowed roles: `Owner`, `Admin`, `Developer`, `Supervisor`, `User
        manager`.


        **Example request:** Get two first identities.
      tags:
        - subpackage_users
      parameters:
        - name: application_id
          in: query
          description: The application ID to filter
          required: true
          schema:
            type: integer
        - name: application_name
          in: query
          description: The application name part to filter
          required: true
          schema:
            type: string
        - name: skill_id
          in: query
          description: The skill ID to filter
          required: false
          schema:
            type: integer
        - name: excluded_skill_id
          in: query
          description: The excluded skill ID to filter
          required: false
          schema:
            type: integer
        - name: acd_queue_id
          in: query
          description: The ACD queue ID to filter
          required: false
          schema:
            type: integer
        - name: excluded_acd_queue_id
          in: query
          description: The excluded ACD queue ID to filter
          required: false
          schema:
            type: integer
        - name: user_id
          in: query
          description: The user ID to filter
          required: false
          schema:
            type: integer
        - name: user_name
          in: query
          description: The user name part to filter
          required: false
          schema:
            type: string
        - name: user_active
          in: query
          description: >-
            Whether the user is active to filter. Inactive users cannot log in
            to applications
          required: false
          schema:
            type: boolean
        - name: user_display_name
          in: query
          description: The user display name part to filter
          required: false
          schema:
            type: string
        - name: with_skills
          in: query
          description: Whether to get the bound skills
          required: false
          schema:
            type: boolean
            default: false
        - name: with_queues
          in: query
          description: Whether to get the bound queues
          required: false
          schema:
            type: boolean
            default: false
        - name: acd_status
          in: query
          description: >-
            The ACD status list separated by semicolons (;) to filter. The
            following values are possible: OFFLINE, ONLINE, READY, BANNED,
            IN_SERVICE, AFTER_SERVICE, TIMEOUT, DND
          required: false
          schema:
            type: array
            items:
              type: string
        - name: showing_skill_id
          in: query
          description: The skill to show in the 'skills' field output
          required: false
          schema:
            type: integer
        - name: count
          in: query
          description: The max returning record count
          required: false
          schema:
            type: integer
            default: 20
        - name: offset
          in: query
          description: The first **N** records are skipped in the output
          required: false
          schema:
            type: integer
            default: 0
        - name: order_by
          in: query
          description: >-
            The following values are available: 'user_id', 'user_name' and
            'user_display_name'
          required: false
          schema:
            type: string
            default: user_name
        - name: return_live_balance
          in: query
          description: Whether to get the user live balance
          required: false
          schema:
            type: boolean
            default: true
        - name: Authorization
          in: header
          description: >-
            Voximplant Management API uses signed JWT tokens generated from your
            service-account private key. Pass the token in the `Authorization`
            header as a Bearer value:


            ```

            Authorization: Bearer $VOXIMPLANT_TOKEN

            ```


            See [Authorization](/api-reference/management-api/authorization) for
            ready-to-copy snippets in bash, Python, Node.js and Go that turn
            your `credentials.json` into a token.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/users_GetUsers_Response_200'
servers:
  - url: https://api.voximplant.com/platform_api
components:
  schemas:
    ApplicationInfoType:
      type: object
      properties:
        application_id:
          type: integer
          description: The application ID
        application_name:
          type: string
          description: The full application name
        modified:
          type: string
          description: |-
            Timestamp in YYYY-MM-DD HH:mm:ss format.

            The application editing UTC date in 24-h format: YYYY-MM-DD HH:mm:ss
        secure_record_storage:
          type: boolean
          description: Whether a secure storage for logs and records is enabled
      description: The [GetApplications] function result.
      title: ApplicationInfoType
    SkillInfoType:
      type: object
      properties:
        skill_id:
          type: integer
          description: The skill ID
        skill_name:
          type: string
          description: The skill name
      description: The [GetSkills] function result.
      title: SkillInfoType
    ACDQueueOperatorInfoType:
      type: object
      properties:
        acd_queue_id:
          type: integer
          description: The ACD queue ID
        acd_queue_name:
          type: string
          description: The ACD queue name
        auto_link:
          type: boolean
          description: Whether the user is bound to the ACD queue in manual mode if false
      description: The 'acd_queues' element of the [GetUsers] function result.
      title: ACDQueueOperatorInfoType
    UserInfoType:
      type: object
      properties:
        user_id:
          type: integer
          description: The user ID
        user_name:
          type: string
          description: The user name
        user_display_name:
          type: string
          description: The display user name
        user_active:
          type: boolean
          description: >-
            Whether the user is active. Inactive users cannot log in to
            applications
        parent_accounting:
          type: boolean
          description: >-
            Whether the user uses the parent account's money, 'false' if the
            user has a separate balance
        live_balance:
          type: number
          format: double
          description: >-
            The current user's money in the currency specified for the account.
            The value is the number rounded to 4 decimal places, and it changes
            during the calls, transcribing, purchases etc
        balance:
          type: number
          format: double
          description: >-
            The current user's money in the currency specified for the account.
            The value is the number rounded to 4 decimal places. The parameter
            is the alias to live_balance by default. But there is a possibility
            to make the alias to fixed_balance: just to pass
            return_live_balance=false into the [GetAccountInfo] method
        fixed_balance:
          type: number
          format: double
          description: >-
            The last committed balance which has been approved by billing's
            transaction
        user_custom_data:
          type: string
          description: The custom data
        applications:
          type: array
          items:
            $ref: '#/components/schemas/ApplicationInfoType'
          description: The bound applications
        skills:
          type: array
          items:
            $ref: '#/components/schemas/SkillInfoType'
          description: The bound skills
        acd_queues:
          type: array
          items:
            $ref: '#/components/schemas/ACDQueueOperatorInfoType'
          description: The bound ACD queues
        acd_status:
          type: string
          description: >-
            The ACD operator status. The following values are possible: OFFLINE,
            ONLINE, READY, BANNED, IN_SERVICE, AFTER_SERVICE, TIMEOUT, DND
        acd_status_change_time:
          type: string
          description: |-
            Timestamp in YYYY-MM-DD HH:mm:ss format.

            The ACD status changing UTC date in 24-h format: YYYY-MM-DD HH:mm:ss
        created:
          type: string
          description: |-
            Timestamp in YYYY-MM-DD HH:mm:ss format.

            The user editing UTC date in 24-h format: YYYY-MM-DD HH:mm:ss
        modified:
          type: string
          description: |-
            Timestamp in YYYY-MM-DD HH:mm:ss format.

            The user editing UTC date in 24-h format: YYYY-MM-DD HH:mm:ss
        frozen:
          type: boolean
      description: The [GetUsers] function result.
      title: UserInfoType
    users_GetUsers_Response_200:
      type: object
      properties:
        result:
          type: array
          items:
            $ref: '#/components/schemas/UserInfoType'
          description: The UserInfoType records
        total_count:
          type: integer
          description: The total found user count
        count:
          type: integer
          description: The returned user count
      title: users_GetUsers_Response_200
  securitySchemes:
    JwtAuth:
      type: http
      scheme: bearer
      description: >-
        Voximplant Management API uses signed JWT tokens generated from your
        service-account private key. Pass the token in the `Authorization`
        header as a Bearer value:


        ```

        Authorization: Bearer $VOXIMPLANT_TOKEN

        ```


        See [Authorization](/api-reference/management-api/authorization) for
        ready-to-copy snippets in bash, Python, Node.js and Go that turn your
        `credentials.json` into a token.

```

## SDK Code Examples

```python Example 1
import requests

url = "https://api.voximplant.com/platform_api/GetUsers"

querystring = {"application_id":"12345","application_name":"CustomerSupportApp","count":"2","offset":"0","order_by":"user_name"}

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers, params=querystring)

print(response.json())
```

```javascript Example 1
const url = 'https://api.voximplant.com/platform_api/GetUsers?application_id=12345&application_name=CustomerSupportApp&count=2&offset=0&order_by=user_name';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Example 1
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.voximplant.com/platform_api/GetUsers?application_id=12345&application_name=CustomerSupportApp&count=2&offset=0&order_by=user_name"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Example 1
require 'uri'
require 'net/http'

url = URI("https://api.voximplant.com/platform_api/GetUsers?application_id=12345&application_name=CustomerSupportApp&count=2&offset=0&order_by=user_name")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java Example 1
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.voximplant.com/platform_api/GetUsers?application_id=12345&application_name=CustomerSupportApp&count=2&offset=0&order_by=user_name")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php Example 1
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.voximplant.com/platform_api/GetUsers?application_id=12345&application_name=CustomerSupportApp&count=2&offset=0&order_by=user_name', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Example 1
using RestSharp;

var client = new RestClient("https://api.voximplant.com/platform_api/GetUsers?application_id=12345&application_name=CustomerSupportApp&count=2&offset=0&order_by=user_name");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Example 1
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.voximplant.com/platform_api/GetUsers?application_id=12345&application_name=CustomerSupportApp&count=2&offset=0&order_by=user_name")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```