Description

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

Examples 


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

{
 "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"
  }
}
<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>

   

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.
"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