---
title: "Returns the specified auth client."
method: GET
path: "/auth-clients/{auth-client_id}"
tags: ["auth clients"]
---

# Returns the specified auth client.

`GET /auth-clients/{auth-client_id}`

You need one of the `global.auth_clients.get`, `tenants.auth_clients.get`, `contracts.auth_clients.get` or `workspaces.auth_clients.get` permission to access this resource. Each permission allows to get auth client in particular scope inclusively: `global.auth_clients.get` allows to get global client, `tenants.auth_clients.get` allows to get global and tenant’s clients, `contracts.auth_clients.get` allows to get global, tenant’s and all tenant’s contracts clients, `workspaces.auth_clients.get` allows to get global, tenant’s, contracts’ and workspaces’ clients. `auth_clients.get` permissions are also used to authorize access to auth client’s credentials field: one can see auth client’s credential only if client’s scope and permission’s scope match, i.e. credentials of tenant’s auth client are visible for users only with `tenants.auth_clients.get` permissions, though tenant auth client itself is visible for users with `workspaces.auth_clients.get`.
To specify scope of request one of `workspace_id`, `contract_id` or `tenant_id` query parameters is used. For example, tenant auth client can be retrieved by id if user has `workspaces.auth_clients.get` permission in one of the tenant’s workspaces, so to specify those workspace `workspace_id` query parameter is used, without scope parameter you can get only global client. In case if the user tries to get not a global client and doesn’t specify the query parameter - such request will be rejected, as permission can’t be checked.

## Path parameters

- `auth-client_id` string, required

## Query parameters

- `workspace_id` string
- `contract_id` string
- `tenant_id` string

## Response `200`

OK

- object
  - `data` object, required
    - `id` string, required
    - `type` 'auth-client', required — Allowed value: `auth-client`
    - `links` object, required
      - `self` string, required
    - `attributes` object, required
      - `name` string, required — Name of the auth client
      - `type` 'oauth2' | 'oauth2_instagram' | 'basic' | 'api_key' | 'noauth', required — Auth client type
      - `credentials` union, required
        - object — Only for type of auth client `oauth2`
          - `client_id` string, required — Client identifier of auth client
          - `client_secret` string, required — Client secret of auth client
          - `refresh_token_uri` string, required — Auth client refresh token URI
          - `token_expires_in` integer — The value that will be set as `expires_in` in auth secret linked to the auth client after auth secret refresh, if auth secret does not contain it.
          - `token_uri` string, required — Auth client token URI
          - `auth_uri` string, required — Auth client auth URI
        - object — Only for type of auth client `oauth2_instagram`
          - `client_id` string, required — Client identifier of auth client
          - `client_secret` string, required — Client secret of auth client
          - `refresh_token_uri` string, required — Auth client refresh token URI
          - `token_expires_in` integer — The value that will be set as `expires_in` in auth secret linked to the auth client after auth secret refresh, if auth secret does not contain it.
          - `token_uri` string, required — Auth client token URI
          - `auth_uri` string, required — Auth client auth URI
          - `exchange_token_uri` string, required — Auth client exchange token URI
        - object
    - `relationships` union, required
      - object
        - `components` object, required
          - `data` object[], required
            - `id` string, required — Component identifier
            - `type` 'component', required — Allowed value is `component`
        - `workspace` object, required
          - `data` object, required
            - `id` string, required — Workspace identifier
            - `type` 'workspace', required — Allowed value is `workspace`
          - `links` object, required
            - `self` string, required
      - object
        - `components` object, required
          - `data` object[], required
            - `id` string, required — Component identifier
            - `type` 'component', required — Allowed value is `component`
      - object
        - `components` object, required
          - `data` object[], required
            - `id` string, required — Component identifier
            - `type` 'component', required — Allowed value is `component`
        - `contract` object, required
          - `data` object, required
            - `id` string, required — Contract identifier
            - `type` 'contract', required — Allowed value is `contract`
          - `links` object, required
            - `self` string, required
      - object
        - `components` object, required
          - `data` object[], required
            - `id` string, required — Component identifier
            - `type` 'component', required — Allowed value is `component`
        - `tenant` object, required
          - `data` object, required
            - `id` string, required — Tenant identifier
            - `type` 'tenant', required — Allowed value is `tenant`
          - `links` object, required
            - `self` string, required
  - `meta` object, required

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found

---

[API](https://skmtc.net/elastic/apis/elastic-io-rest-api-documentation-v2.md) · [All operations](https://skmtc.net/elastic/apis/elastic-io-rest-api-documentation-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elastic/elastic-io-rest-api-documentation-v2/revisions/411f9f98c01e/schema)
