Child pages
  • WHM API 1 Functions - set_provider_client_configurations
Skip to end of metadata
Go to start of metadata

 

Description

This function sets the values of configuration fields for an external authentication identity provider.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/set_provider_client_configurations?api.version=1&provider_id=cpanelid&service_name=cpaneld&configurations=%7B%22client_id%22%3A%22victoria%22%2C%22client_secret%22%3A%22secret%22%7D
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/set_provider_client_configurations?api.version=1&provider_id=cpanelid&service_name=cpaneld&configurations=%7B%22client_id%22%3A%22victoria%22%2C%22client_secret%22%3A%22secret%22%7D
 Command Line
whmapi1 set_provider_client_configurations provider_id=cpanelid service_name=cpaneld configurations=%7B%22client_id%22%3A%22victoria%22%2C%22client_secret%22%3A%22secret%22%7D


Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{
 "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "set_provider_client_configurations"
  }
}
 Output (XML)
<result>
    <data/>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>set_provider_client_configurations</command>
    </metadata>
</result>


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

   

Parameters

ParameterTypeDescriptionPossible valuesExample
service_namestring

Required

The cPanel & WHM service's name.

A valid service name.

  • cpaneld
  • whostmgrd
  • webmaild
cpaneld
provider_idstring

Required

The identity provider's key.

A valid identity provider's key.

cpanelid
configurationshash

Required

The configuration values to set for the identity provider.

A JSON-formatted set of values.

Note:

The items within the configurations hashes depend on the fields that the provider implements through OpenID.

 Click to view...

{"client_id":"victoria","client_secret":"secret"}


Returns

This function only returns metadata.