> ## Documentation Index
> Fetch the complete documentation index at: https://gcore.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get users

> Get a list of users.

Pass a value for the `limit` parameter in your request if you want retrieve a paginated result.
Otherwise API returns a list with all users without pagination.



## OpenAPI

````yaml /api-reference/services_documented/iam_api.yaml get /iam/users
openapi: 3.1.0
info:
  title: Gcore OpenAPI – IAM API
  description: >-
    This OpenAPI is an aggregated OpenAPI specification that unifies all Gcore
    products into a single file. It covers Cloud, CDN, DNS, WAAP, DDoS
    Protection, Object Storage, Streaming, and FastEdge services.
  version: '2026-05-11T15:10:30.328297+00:00'
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: Account
    description: >-
      Account management operations including authentication, password
      management, and account details.
    x-displayName: Account
  - name: API Tokens
    description: >-
      Use permanent API tokens for regular automated requests to services.

      You can either set its validity period when creating it or issue a token
      for an unlimited time.

      Please address the API documentation of the specific product in order to
      check if it supports API tokens.


      Newer endpoints under `/v2/…` issue tokens using `_` (underscore) as the
      separator

      (for example `42_a1b2c3d4e5f6...`) and are the recommended way to create
      new tokens.

      Legacy endpoints that issue `$`-separated tokens are marked deprecated and
      will be removed

      on **2026-07-17**; tokens that were already issued keep authenticating.


      Provide your APIKey in the Authorization header.


      Example: ```curl -H "Authorization: APIKey 42_a1b2c3d4e5f6..."
      https://api.gcore.com/iam/users/me```


      Please note: When authorizing via SAML SSO, our system does not have any

      information about permissions given to the user by the identity provider.

      Even if the provider revokes the user's access rights, their tokens remain
      active.

      Therefore, if necessary, the token will need to be deleted manually.
    x-displayName: API Tokens
  - name: Users
    x-displayName: Users
paths:
  /iam/users:
    get:
      tags:
        - Users
      summary: Get users
      description: >-
        Get a list of users.


        Pass a value for the `limit` parameter in your request if you want
        retrieve a paginated result.

        Otherwise API returns a list with all users without pagination.
      operationId: iamGetUsers
      parameters:
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Offset'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedUsersArray'
        '401':
          $ref: '#/components/responses/401'
      x-codeSamples:
        - lang: Python
          source: |-
            import os
            from gcore import Gcore

            client = Gcore(
                api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
            )
            page = client.iam.users.list()
            page = page.results[0]
            print(page.id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/G-Core/gcore-go\"\n\t\"github.com/G-Core/gcore-go/iam\"\n\t\"github.com/G-Core/gcore-go/option\"\n)\n\nfunc main() {\n\tclient := gcore.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.Iam.Users.List(context.TODO(), iam.UserListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n"
components:
  parameters:
    Limit:
      name: limit
      in: query
      description: The maximum number of items.
      schema:
        type: integer
    Offset:
      name: offset
      in: query
      description: Offset relative to the beginning of list.
      schema:
        type: integer
  schemas:
    PaginatedUsersArray:
      type: object
      required:
        - count
        - results
      properties:
        count:
          type: integer
          description: Total number of users
        next:
          type: string
          description: URL to the next users slice
          example: /users?offset=20&limit=10
        previous:
          type: string
          description: URL to the previous users slice
          example: /users?offset=10&limit=10
        results:
          type: array
          items:
            $ref: '#/components/schemas/User'
    User:
      type: object
      required:
        - id
        - email
        - name
        - lang
        - phone
        - company
        - reseller
        - client
        - deleted
        - groups
        - activated
        - sso_auth
        - two_fa
        - auth_types
        - user_type
        - is_active
        - client_and_roles
      properties:
        id:
          type: integer
          description: User's ID.
          readOnly: true
        email:
          $ref: '#/components/schemas/UserEmail'
        name:
          $ref: '#/components/schemas/UserName'
        lang:
          $ref: '#/components/schemas/Language'
        phone:
          $ref: '#/components/schemas/UserPhone'
        company:
          $ref: '#/components/schemas/UserCompany'
        reseller:
          type: integer
          description: Services provider ID.
          readOnly: true
        client:
          type: number
          description: User's account ID.
          readOnly: true
        deleted:
          type: boolean
          description: Deletion flag. If `true` then user was deleted.
          readOnly: true
        groups:
          $ref: '#/components/schemas/UserGroups'
        activated:
          type: boolean
          description: |-
            Email confirmation:
            - `true` – user confirmed the email;
            - `false` – user did not confirm the email.
          readOnly: true
        sso_auth:
          type: boolean
          description: SSO authentication flag. If `true` then user can login via SAML SSO.
          readOnly: true
        two_fa:
          type: boolean
          description: |-
            Two-step verification:
            - `true` – user enabled two-step verification;
            - `false` – user disabled two-step verification.
          readOnly: true
        auth_types:
          $ref: '#/components/schemas/AuthTypes'
        user_type:
          $ref: '#/components/schemas/UserType'
        is_active:
          type: boolean
          description: User activity flag.
          readOnly: true
        client_and_roles:
          $ref: '#/components/schemas/UserClientAndRoles'
    UserEmail:
      type: string
      format: email
      description: User's email address.
    UserName:
      type: string
      description: User's name.
      nullable: true
    Language:
      type: string
      description: |-
        User's language.

        Defines language of the control panel and email messages.
      enum:
        - de
        - en
        - ru
        - zh
        - az
    UserPhone:
      type: string
      description: User's phone.
      nullable: true
    UserCompany:
      type: string
      description: User's company.
    UserGroups:
      type: array
      description: |-
        User's group in the current account.

        IAM supports 5 groups:

         - Users
        - Administrators
        - Engineers
        - Purge and Prefetch only (API)
        - Purge and Prefetch only (API+Web)
      items:
        $ref: '#/components/schemas/Group'
    AuthTypes:
      type: array
      items:
        $ref: '#/components/schemas/AuthType'
      description: System field. List of auth types available for the account.
    UserType:
      type: string
      description: User's type.
      enum:
        - common
        - reseller
        - seller
      readOnly: true
    UserClientAndRoles:
      type: array
      description: List of user's clients. User can access to one or more clients.
      readOnly: true
      items:
        required:
          - client_company_name
          - client_id
          - user_id
          - user_roles
        type: object
        properties:
          client_id:
            type: integer
          client_company_name:
            type: string
          user_roles:
            type: array
            description: User role in this client.
            example:
              - '2'
            items:
              type: string
              description: String representation of role id.
          user_id:
            type: integer
            description: User's ID.
    Group:
      type: object
      properties:
        id:
          type: integer
          example: 1
          description: >-
            Group's ID: Possible values are:   


            - 1 - Administrators* 2 - Users* 5 - Engineers* 3009 - Purge and
            Prefetch only (API+Web)* 3022 - Purge and Prefetch only (API)
        name:
          type: string
          example: Administrators
          description: Group's name.
          enum:
            - Users
            - Administrators
            - Engineers
            - Purge and Prefetch only (API)
            - Purge and Prefetch only (API+Web)
    AuthType:
      type: string
      description: Auth types.
      enum:
        - password
        - sso
        - github
        - google-oauth2
  responses:
    '401':
      description: >-
        Authentication credentials were not provided or given token not valid
        for any token type.
  securitySchemes:
    APIKey:
      description: >-
        API key for authentication. Make sure to include the word `apikey`,
        followed by a single space and then your token.

        Example: `apikey 1234$abcdef`
      type: apiKey
      in: header
      name: Authorization

````