Method: Auth0::Api::V2::Clients#client

Defined in:
lib/auth0/api/v2/clients.rb

#client(client_id, fields: nil, include_fields: nil) ⇒ json

Retrieves a client by its id.

Parameters:

  • client_id (string)

    The id of the client to retrieve.

  • fields (string) (defaults to: nil)

    A comma separated list of fields to include or exclude from the result.

  • include_fields (boolean) (defaults to: nil)

    True if the fields specified are to be included in the result, false otherwise.

Returns:

  • (json)

    Returns the requested client application.

Raises:

See Also:



45
46
47
48
49
50
51
52
53
54
# File 'lib/auth0/api/v2/clients.rb', line 45

def client(client_id, fields: nil, include_fields: nil)
  raise Auth0::MissingClientId, 'Must specify a client id' if client_id.to_s.empty?
  include_fields = true if !fields.nil? && include_fields.nil?
  request_params = {
    fields: fields,
    include_fields: include_fields
  }
  path = "#{clients_path}/#{client_id}"
  get(path, request_params)
end