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

 

Description

This function retrieves the configuration details for the client of an external authentication identity provider.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/get_provider_client_configurations&provider_id=cpanelid&service_name=cpaneld
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/get_provider_client_configurations?api.version=1&provider_id=cpanelid&service_name=cpaneld
 Command Line
whmapi1 get_provider_client_configurations provider_id=cpanelid service_name=cpaneld


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)
{
 "data": { 
   {
    "client_configurations": {
      "redirect_uris": [
        "https://hostname.example.com:2083/openid_connect_callback/cpanelid",
        "https://hostname.example.com:2087/openid_connect_callback/cpanelid",
        "https://hostname.example.com:2096/openid_connect_callback/cpanelid"
      ],
      "client_id": "123456789",
      "client_secret": "victoria"
    }
   }
 "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "get_provider_client_configurations"
  }
}
 Output (XML)
<result>
    <data>
        <client_configurations>
            <redirect_uris>
                https://yourhostserver.com:2083/openid_connect_callback/cpanelid
            </redirect_uris>
            <redirect_uris>
                https://yourhostserver.com:2087/openid_connect_callback/cpanelid
            </redirect_uris>
            <redirect_uris>
                https://yourhostserver.com:2096/openid_connect_callback/cpanelid
            </redirect_uris>
            <client_secret>victoria</client_secret>
            <client_id>
                XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.id.cpanel.com
            </client_id>
        </client_configurations>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>get_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


Returns

ReturnTypeDescriptionPossible valuesExample

client_configurations

hash

A hash of the client configuration information.

 

This hash includes the client_id and client_secret returns and the redirect_uris array.

 

redirect_uris

array

The redirection URIs for each interface that the identity provider uses.

The function returns this value in the client_configurations hash.

An array of URIs.
 Click to view...
"https://hostname.example.com:2083/openid_connect_callback/cpanelid",
"https://hostname.example.com:2087/openid_connect_callback/cpanelid",
"https://hostname.example.com:2096/openid_connect_callback/cpanelid"

client_id

string

The client ID for the identity provider.

The function returns this value in the client_configurations hash.

A valid string.1234567890

client_secret

string

The secret for the client ID.

The function returns this value in the client_configurations hash.

A valid string.victoria