Method: Auth0::Api::V2::Clients#create_client

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

#create_client(name, options = {}) ⇒ json

Creates a new client application.

Parameters:

  • name (string)

    The name of the client. Must contain at least one character. Does not allow ‘<’ or ‘>’.

  • options (hash) (defaults to: {})

    The Hash options used to define the client’s properties.

Returns:

  • (json)

    Returns the created client application.

Raises:

See Also:



32
33
34
35
36
37
# File 'lib/auth0/api/v2/clients.rb', line 32

def create_client(name, options = {})
  raise Auth0::MissingParameter, 'Must specify a valid client name' if name.to_s.empty?
  request_params = Hash[options.map { |(k, v)| [k.to_sym, v] }]
  request_params[:name] = name
  post(clients_path, request_params)
end