Description

This function checks whether a user can access a particular feature.

Examples 


https://hostname.example.com:2087/cpsess##########/json-api/verify_user_has_feature?api.version=1&user=username&feature=sslinstall
https://hostname.example.com:2087/cpsess##########/xml-api/verify_user_has_feature?api.version=1&user=username&feature=sslinstall
whmapi1 verify_user_has_feature user=username feature=featurename

{  
   "metadata":{  
      "reason":"OK",
      "version":1,
      "command":"verify_user_has_feature",
      "result":1
   },
   "data":{  
      "query_feature":"sslinstall",
      "has_feature":1
   }
}
<result>
    <metadata>
        <result>1</result>
        <version>1</version>
        <reason>OK</reason>
        <command>verify_user_has_feature</command>
    </metadata>
    <data>
        <has_feature>1</has_feature>
        <query_feature>sslinstall</query_feature>
    </data>
</result>

Parameters

ParameterTypeDescriptionPossible valuesExample

user

string

Required

The user's username.

A valid cPanel username.username
featurestring

Required

The feature's name.


 

A valid feature name.

Call WHM API 1's get_feature_names function to view available features.

sslinstall

Returns

ReturnTypeDescriptionPossible valuesExample
query_featurestringThe feature's name.A valid feature name.sslinstall

has_feature

Boolean

Whether the user can access the feature.

  • 1 — The user can access the feature.
  • 0 — The user cannot access the feature.
 1